// PascalABC.NET 3.0, сборка 1139 от 10.01.2016 begin var n:=ReadInteger('Количество элементов в массиве: '); var a:=ArrRandom(n,-50,50); a.Println(','); Writeln('Четные элементы: '); var i:=1; while i<n do begin Write(a[i],' '); Inc(i,2) end; Writeln; Writeln('Нечетные элементы: '); i:=0; while i<n-1 do begin Write(a[i],' '); Inc(i,2) end; Writeln end.
Тестовое решение: Количество элементов в массиве: 10 15,-18,-29,-25,46,21,-8,-17,-9,15 Четные элементы: -18 -25 21 -17 15 Нечетные элементы: 15 -29 46 -8 -9
Program go; var x,y,z,n:real; begin write('Введите сегодняшнее число: '); readln(x); write('Введите номер сегодняшнего месяца: '); readln(y); begin if y=1 then n:=365-x else; if y=2 then n:=365-31-x else; if y=3 then n:=365-31-28-x else; if y=4 then n:=365-31-28-31-x else; if y=5 then n:=365-31-28-31-30-x else; if y=6 then n:=365-31-28-31-30-31-x else; if y=7 then n:=365-31-28-31-30-31-30-x else; if y=8 then n:=365-31-28-31-30-31-30-31-x else; if y=9 then n:=365-31-28-31-30-31-30-31-31-x else; if y=10 then n:=365-31-28-31-30-31-30-31-31-30-x else; if y=11 then n:=365-31-28-31-30-31-30-31-31-30-31-x else; if y=12 then n:=365-31-28-31-30-31-30-31-31-30-31-30-x else; end; writeln ('До Нового года осталось: ',n); end.
Решение находится на прикрепленном изображении.