Помогите с Pascal
Добавлено: 17 авг 2008, 16:57
var
day : integer;
month : char;
year : integer;
ostatok : integer;
begin
Write('Enter the day');
readln(day);
Write('Enter the month');
readln(month);
Write('Enter the year');
readln(year);
ostatok := year mod 4;
case month of
'1','3','5','7','8' : begin
if (day <=31) then writeln('Correct');
'2','4','6','11' :begin
if (day <= 30) then writeln('Correct');
'2' : begin
if (day <= 28) and (ostatok <> 0) then writeln('Correct');
if (day <=28) and (ostatok = 0) then (writeln ('Correct');
'10','12' : begin
if (day <=31 ) then writeln('Correct');
else writeln('False');
end;
end;
end;
end;
readln;
У меня ошибка вылезает, никак не могу исправить
day : integer;
month : char;
year : integer;
ostatok : integer;
begin
Write('Enter the day');
readln(day);
Write('Enter the month');
readln(month);
Write('Enter the year');
readln(year);
ostatok := year mod 4;
case month of
'1','3','5','7','8' : begin
if (day <=31) then writeln('Correct');
'2','4','6','11' :begin
if (day <= 30) then writeln('Correct');
'2' : begin
if (day <= 28) and (ostatok <> 0) then writeln('Correct');
if (day <=28) and (ostatok = 0) then (writeln ('Correct');
'10','12' : begin
if (day <=31 ) then writeln('Correct');
else writeln('False');
end;
end;
end;
end;
readln;
У меня ошибка вылезает, никак не могу исправить
