Program Case9;
Var
D, M: Integer;
Begin
WriteLn('Введите D (день) и M (месяц):');
ReadLn(D, M);
Case D Of
1:
Begin
Case M of
1, 2, 4, 6, 8, 9, 11:
D := 31;
3:
D := 28;
Else
D := 30;
End;
Inc(M);
End;
Else
Inc(D);
End;
WriteLn('Cледующая дата: ', D, '.', M);
End.