1
x = int(input())
if(x >= 100 and x <= 999):
print("Число трехзначное")
else: print("Число НЕ трехзначное")
2
month = int(input())
if(month >= 1 and month <= 12):
if(month == 1 or month == 3 or month == 5 or month == 7 or month == 8
or month == 10 or month == 12):
print(31)
elif(month == 2):
print(28)
else: print(30)
else: print("Неверно введеный номер месяца!")
3
from sys import exit
month = int(input("Месяц: "))
day = int(input("День: "))
remainder = 0
if(month == 1 or month == 3 or month == 5 or
month == 7 or month == 8 or month == 10 or month == 12):
if(day >= 1 and day <= 31):
pass
else: print("Неверно введены дни месяца!"); exit();
if(day >= 1 and day <= 28):
else:
if(day >= 1 and day <= 30):
print("Неверно введены дни месяца!"); exit();
for i in range(1, month+1):
if(i == 1 or i == 3 or i == 5 or i == 7 or i == 8
or i == 10 or i == 12):
remainder += 31
elif(i == 2):
remainder += 28
else: remainder += 30
remainder += day
print("До нового года осталось: " + str(365 - remainder))
4
if(month == 12 or month == 1 or month == 2):
print("Winter!")
elif(month == 3 or month == 4 or month == 5):
print("Spring!")
elif(month == 6 or month == 7 or month == 8):
print("Summer!")
elif(month == 9 or month == 10 or month == 11):
print("Autumn!")
else: print("Wrong number of month!")
// Внимание! Если программа не работает, обновите версию!
begin
var a:=ArrRandom(135,150,300); a.Println;
end.
Пример
259 236 185 153 260 288 245 189 168 257 243 279 191 162 253 286 286 254 256 175 170 295 195 299 201 183 291 195 165 266 280 195 194 207 193 274 243 191 151 211 264 265 229 169 225 240 298 232 162 159 252 254 252 236 269 265 191 187 253 226 297 200 173 202 278 198 235 284 269 279 193 245 252 195 211 205 216 176 223 261 185 209 182 156 163 175 243 258 238 229 233 205 238 225 214 214 242 176 192 177 154 163 264 183 267 157 152 207 174 214 199 164 265 292 191 238 167 167 188 252 255 278 196 190 196 289 156 176 281 298 264 189 285 196 256
1
x = int(input())
if(x >= 100 and x <= 999):
print("Число трехзначное")
else: print("Число НЕ трехзначное")
2
month = int(input())
if(month >= 1 and month <= 12):
if(month == 1 or month == 3 or month == 5 or month == 7 or month == 8
or month == 10 or month == 12):
print(31)
elif(month == 2):
print(28)
else: print(30)
else: print("Неверно введеный номер месяца!")
3
from sys import exit
month = int(input("Месяц: "))
day = int(input("День: "))
remainder = 0
if(month >= 1 and month <= 12):
if(month == 1 or month == 3 or month == 5 or
month == 7 or month == 8 or month == 10 or month == 12):
if(day >= 1 and day <= 31):
pass
else: print("Неверно введены дни месяца!"); exit();
elif(month == 2):
if(day >= 1 and day <= 28):
pass
else: print("Неверно введены дни месяца!"); exit();
else:
if(day >= 1 and day <= 30):
pass
else:
print("Неверно введены дни месяца!"); exit();
for i in range(1, month+1):
if(i == 1 or i == 3 or i == 5 or i == 7 or i == 8
or i == 10 or i == 12):
remainder += 31
elif(i == 2):
remainder += 28
else: remainder += 30
remainder += day
print("До нового года осталось: " + str(365 - remainder))
else: print("Неверно введеный номер месяца!")
4
month = int(input())
if(month >= 1 and month <= 12):
if(month == 12 or month == 1 or month == 2):
print("Winter!")
elif(month == 3 or month == 4 or month == 5):
print("Spring!")
elif(month == 6 or month == 7 or month == 8):
print("Summer!")
elif(month == 9 or month == 10 or month == 11):
print("Autumn!")
else: print("Wrong number of month!")