var
months: array[1..12] of string[15];
durations: array[1..12]of integer;
i, d: integer;
begin
months[1] := 'январь';durations[1] := 31;
months[2] := 'февраль';durations[2] := 28;
months[3] := 'март';durations[3] := 31;
months[4] := 'апрель';durations[4] := 30;
months[5] := 'май';durations[5] := 31;
months[6] := 'июнь';durations[6] := 30;
months[7] := 'июль';durations[7] := 31;
months[8] := 'август';durations[8] := 31;
months[9] := 'сентябрь';durations[9] := 30;
months[10] := 'октябрь';durations[10] := 31;
months[11] := 'ноябрь';durations[11] := 30;
months[12] := 'декабрь';durations[12] := 31;
write('Введите день года >> ');
readln(d);
d := d mod 365;
for i := 1 to 12 do
if d
writeln(months[i], ' ', d);
break;
end
else
d := d - durations[i];
end.
2)
const
x0 = 0;
xn = 3;
n = 100;
var
x, dx, s: real;
begin
x := x0;
dx := (xn - x0) / n;
s := 0;
repeat
s := s + x * x + sin(x);
x := x + dx;
until x >= xn;
writeln('S = ', s * dx);
end.