Составить программу, определяющую животное, соответствующее году по китайскому гороскопу
207
392
Ответы на вопрос:
Var a, b, c, i: integer; begin read (a); a: =a-4; if a = -3 then write ('петух'); if a = -2 then write ('собака'); if a = -1 then write ('свинья '); if a mod 12 = 0 then writeln ('крыса'); if a mod 12 = 1 then writeln ('бык'); if a mod 12 = 2 then writeln ('тигр'); if a mod 12 = 3 then writeln ('кролик'); if a mod 12 = 4 then writeln ('дракон'); if a mod 12 = 5 then writeln ('змея'); if a mod 12 = 6 then writeln ('лошадь'); if a mod 12 = 7 then writeln ('овца'); if a mod 12 = 8 then writeln ('обезьяна'); if a mod 12 = 9 then writeln ('петух'); if a mod 12 = 10 then writeln ('собака'); if a mod 12 = 11 then writeln ('свинья'); end.
Program god_japan; var y, y1: integer; color : integer; beast : integer; begin write('введите год'); readln(year); year1 : = ((year - 1984) mod 60 + 60) mod 60; beast : = year1 mod 12; color : = (year1 div 12) mod 5; write(year, ' - год '); if beast in [2, 3, 4] then case color of 0: write('зеленого'); 1: write('красного'); 2: write('желтого'); 3: write('белого'); 4: write('черного'); end else case color of 0: write('зеленой'); 1: write('красной'); 2: write('желтой'); 3: write('белой'); 4: write('черной'); end; write(' '); case beast of 0: write('крысы'); 1: write('коровы'); 2: write('тигра'); 3: write('зайца'); 4: write('дракона'); 5: write('змеи'); 6: write('лошади'); 7: write('овцы'); 8: write('обезьяны'); 9: write('курицы'); 10: write('собаки'); 11: write('свиньи'); end; writeln(); end.
Омонимы: луг-лук коса-коса мышь-мышь синонимы: машина-автомобиль глаз-око мебель-интерьер
Популярно: Информатика
-
00svetochka0013.11.2022 14:43
-
lele416.07.2021 11:44
-
726262611.12.2021 00:11
-
leraanufrieva21.03.2020 16:11
-
Лизагоу27.12.2021 07:22
-
uefip25.01.2023 02:40
-
sladenykaya13628.03.2023 13:51
-
Dima191102.03.2020 09:38
-
751557531.12.2022 02:49
-
ник502920.11.2022 11:27