Program ArrayMax; Const n = 10; Var a: Array [1..n] of Integer; i, b: Integer; Begin WriteLn('Введите ', n, ' целых чисел через пробел и нажмите Enter'); For i := 1 To n Do Read(a[i]); b := a[2]; For i := 1 To n Do If (i Mod 2 = 0) And (a[i] > b) Then b := a[i]; Write('Результат: ', b); End.
Const n = 10;
Var a: Array [1..n] of Integer;
i, b: Integer;
Begin
WriteLn('Введите ', n, ' целых чисел через пробел и нажмите Enter');
For i := 1 To n Do
Read(a[i]);
b := a[2];
For i := 1 To n Do
If (i Mod 2 = 0) And (a[i] > b) Then
b := a[i];
Write('Результат: ', b);
End.