Program cnaiper; uses crt; const n=15; var sum,t,i: integer; begin writeln('*** alphaues is thinking... ***'); writeln('*** OK ***'); writeln(); writeln('Числа:'); randomize; sum:=0; for i:=1 to n do begin t:=random(100); sum:=sum+t; write (t:5); end; writeln(); writeln('Сумма 15 чисел = ',sum); end.
Program cnaiper;
uses crt;
const n=15;
var
sum,t,i: integer;
begin
writeln('*** alphaues is thinking... ***');
writeln('*** OK ***');
writeln();
writeln('Числа:');
randomize;
sum:=0;
for i:=1 to n do
begin
t:=random(100);
sum:=sum+t;
write (t:5);
end;
writeln();
writeln('Сумма 15 чисел = ',sum);
end.
Блок-схема - во вложении
var a,s,i:integer;
begin
randomize;
s:=0;
for i:=1 to 15 do
begin
a:=random(100);
s:=s+a;
end;
write('s=',s);
end.