Program project1; uses crt,math; const n=10; var s:real; i:byte; a:array [1..n] of integer; begin for i:=1 to n do begin writeln('vvedite ',i,' cifru');readln(a[i]); end; for i:=1 to n do begin if (a[i]<=0) then s:=s+a[i]; end; writeln('summa vseh: ',s:2:2); readln; end.
uses
crt,math;
const
n=10;
var s:real; i:byte; a:array [1..n] of integer;
begin
for i:=1 to n do begin
writeln('vvedite ',i,' cifru');readln(a[i]);
end;
for i:=1 to n do
begin
if (a[i]<=0) then s:=s+a[i];
end;
writeln('summa vseh: ',s:2:2);
readln;
end.