program YesterdayDate; var D, M: integer; begin writeln('Enter the day and month of a non-leap year:'); readln(D, M);
if D = 1 then begin case M of 1, 3, 5, 7, 8, 10, 12: begin D := 31; M := M - 1; end; 2: begin D := 28; M := 2; end; 4, 6, 9, 11: begin D := 30; M := M - 1; end; end; end else begin D := D - 1; end;
writeln('Yesterday''s date is: ', D, '.', M); end.
program YesterdayDate;
var
D, M: integer;
begin
writeln('Enter the day and month of a non-leap year:');
readln(D, M);
if D = 1 then
begin
case M of
1, 3, 5, 7, 8, 10, 12: begin
D := 31;
M := M - 1;
end;
2: begin
D := 28;
M := 2;
end;
4, 6, 9, 11: begin
D := 30;
M := M - 1;
end;
end;
end
else
begin
D := D - 1;
end;
writeln('Yesterday''s date is: ', D, '.', M);
end.