Const n=20;
var a:array[1..n] of integer;
i,s:integer;
begin
Randomize;
for i:=1 to n do
begin
a[i]:=random(90)+10;
write(a[i]:3);
end;
writeln;
s:=0;
for i:=1 to n do
s:=s+a[i] div 10;
writeln(s = ,s);
end.
Пример:
22 88 88 98 54 78 45 89 23 39 13 17 15 38 56 80 51 31 20 30
s = 88