• напишите программу которая вводит с клавиатуры номер месяца и день и определяет сколько дней осталось до нового года

Ответы 1

  • var a,d,count,i:integer;function CountDay(a:integer):integer;beginif (a>=1) then countday:=31;if (a>=2) then countday:=28;if (a>=3) then countday:=31;if (a>=4) then countday:=30;if (a>=5) then countday:=31;if (a>=6) then countday:=30;if (a>=7) then countday:=31;if (a>=8) then countday:=31;if (a>=9) then countday:=30;if (a>=10) then countday:=31;if (a>=11) then countday:=30;if (a>=12) then countday:=31;end;begincount:=0;write('Введите День: ');readln(d);write('Введите Месяц: ');readln(a);if (a<=0)or(a>12)or(d<=0)or(d>countday(a)) then writeln('Ошшибка в данных! ')elsebeginfor i:=a to 12 docount:=count+countday(i);count:=count-d;writeln('До нового года осталось ',count,' дней');end;end.
    • Автор:

      laceycfhf
    • 6 лет назад
    • 0
  • Добавить свой ответ

Войти через Google

или

Забыли пароль?

У меня нет аккаунта, я хочу Зарегистрироваться

How much to ban the user?
1 hour 1 day 100 years