1 câu trả lời
uses crt;
var t:real;
a:array [1..4] of real;
i:byte;
begin
clrscr;
for i:=1 to 4 do
begin
write('Nhap so thu ',i,': ');
readln(a[i]);
if a[i]<0 t:=t+a[i];
end;
write ('Tong cac so thuc am la: ',t:4:2);
readln
end.
uses crt;
var t:real;
a:array [1..4] of real;
i:byte;
begin
clrscr;
for i:=1 to 4 do
begin
write('Nhap so thu ',i,': ');
readln(a[i]);
if a[i]<0 t:=t+a[i];
end;
write ('Tong cac so thuc am la: ',t:4:2);
readln
end.