Type int=100..999; Var x:int; Begin readln(x); case (x div 100) of 1:write('Сто '); 2:write('Двести '); 3:write('Триста '); 4:write('Четыреста '); 5:write('Пятьсот '); 6:write('Шестьсот '); 7:write('Семьсот '); 8:write('Восемьсот '); 9:write('Девятьсот '); end; if ((x mod 100) div 10)=1 then case (x mod 10) of 0:write('десять '); 1:write('одиннадцать '); 2:write('двенадцать '); 3:write('тринадцать '); 4:write('четырнадцать '); 5:write('пятнадцать '); 6:write('шестнадцать '); 7:write('семнадцать '); 8:write('восемнадцать '); 9:write('девятнадцать '); end else begin case ((x mod 100) div 10) of 2:write('двадцать '); 3:write('тридцать '); 4:write('сорок '); 5:write('пятьдесят '); 6:write('шестьдесят '); 7:write('семьдесят '); 8:write('восемьдесят '); 9:write('девяносто '); end; case (x mod 10) of 1:write('один'); 2:write('два'); 3:write('три'); 4:write('четыре'); 5:write('пять'); 6:write('шесть'); 7:write('семь'); 8:write('восемь'); 9:write('девять'); end; end; End.
Python
1.
import random
X = int(input())
N_spisok = []
N = 20
for i in range(0, N):
N_random = random.randint(0, N)
N_spisok.append(N_random)
print(N_spisok)
for i in N_spisok:
if i == X:
print(i)
else:
break
2.
time = int(input())
zima = [12, 1, 2]
vesna = [3, 4, 5]
leto = [6, 7, 8]
osen = [9, 10, 11]
if time in zima:
print('Зима')
elif time in vesna:
print('Весна')
elif time in leto:
print('Лето')
else:
print('Осень')
3.
a = [1, 2, 3, 4, 5, 8, 11, 13, 14, 16, 17]
a.remove(8)
a.append(22)
print(a)
Type int=100..999;
Var x:int;
Begin
readln(x);
case (x div 100) of
1:write('Сто ');
2:write('Двести ');
3:write('Триста ');
4:write('Четыреста ');
5:write('Пятьсот ');
6:write('Шестьсот ');
7:write('Семьсот ');
8:write('Восемьсот ');
9:write('Девятьсот ');
end;
if ((x mod 100) div 10)=1 then
case (x mod 10) of
0:write('десять ');
1:write('одиннадцать ');
2:write('двенадцать ');
3:write('тринадцать ');
4:write('четырнадцать ');
5:write('пятнадцать ');
6:write('шестнадцать ');
7:write('семнадцать ');
8:write('восемнадцать ');
9:write('девятнадцать ');
end
else
begin
case ((x mod 100) div 10) of
2:write('двадцать ');
3:write('тридцать ');
4:write('сорок ');
5:write('пятьдесят ');
6:write('шестьдесят ');
7:write('семьдесят ');
8:write('восемьдесят ');
9:write('девяносто ');
end;
case (x mod 10) of
1:write('один');
2:write('два');
3:write('три');
4:write('четыре');
5:write('пять');
6:write('шесть');
7:write('семь');
8:write('восемь');
9:write('девять');
end;
end;
End.