//PascalABC.NET версия 3.2, сборка 1389 //Если программа не запускается, то обновите версию uses System.Linq; begin begin writeln('I'); var n := ReadInteger('n='); Writeln((1 + 1 + Power(2, n - 1)) * n / 2); end;
begin writeln; writeln('II'); var n := ReadInteger('n='); Writeln(n mod 11 = 0 ? 'YES' : 'NO');
end;
begin writeln; writeln('III'); var a := ReadArrInteger('Документы', ReadInteger('n=')).ToList; writeln;
while a.Any() do begin write(a[0], ' '); a.RemoveAt(0); if not a.Any then break;
write(a.Last, ' '); a.RemoveAt(a.Count - 1); if not a.Any then break;
var n := 0; if a.Count > 1 then n := a.Count div 2 - 1; write(a[n], ' '); a.RemoveAt(n); end; end; end.
Var mas: array [,] of integer; i,j,m,n,s,max: integer; f:boolean; begin write('Введите размерность массива: '); readln(n); write('Введите число m: '); readln(m); setlength(mas,n+1,n+1); for i:=1 to n do begin; for j:=1 to n do begin mas[i,j]:=random(-m,m); write(mas[i,j]:6); if (j>i) and (mas[i,j]=0) then s:=s+1; end; writeln; end; j:=n; f:=false; for i:=1 to n do begin if (mas[i,j] mod 2=0) then begin if f=false then begin max:=mas[i,j]; f:=true; end; if (mas[i,j]>max) then max:=mas[i,j]; end; j:=j-1; end; writeln('Число нулей над гл.диагональю: ',s); writeln('Максимальный четный на доп.диагонали: ',max); end.
знак-- буква--&>цифра