найти сумму элементов массива x[38] стоящих в четных ячейках
Answers & Comments
throwGame
Program arr; var x:array[1..38] of integer; i, s:integer; begin for i:=1 to 38 do read(x[i]); for i:=1 to 38 do if i mod 2 = 0 then s := s+x[i]; writeln(s); end.
Answers & Comments
var x:array[1..38] of integer;
i, s:integer;
begin
for i:=1 to 38 do
read(x[i]);
for i:=1 to 38 do
if i mod 2 = 0 then
s := s+x[i];
writeln(s);
end.