Дан массив из 100 целых чисел и найти сумму элементов массива
Answers & Comments
emblerik
Var a : array [1..100] of integer; i, sum : integer; begin for i := 1 to 100 do read (a[i]); sum := 0; for i := 1 to 100 do sum := sum + a[i]; write (sum); end.
Answers & Comments
a : array [1..100] of integer;
i, sum : integer;
begin
for i := 1 to 100 do read (a[i]);
sum := 0;
for i := 1 to 100 do sum := sum + a[i];
write (sum);
end.