uses crt;
var i,n,n,d: integer;
t: real;
A: array[1..32000] of integer;
begin
clrscr;
readln(n);
for i:=1 to n do
readln(a[i]);
for i:=1 to n do
if a[i] <0 then
begin
d:=d+1;
t:=t+a[i];
end;
writeln('Tong la:',t/n:2:4);
write('Co tat ca so so am la:',d);
readln;
end.
Mik đag cần gấp chiều nay nhờ mn giải giúp mik 😆😆😆
uses crt;
var i,n,n,d: integer;
t: real;
A: array[1..32000] of integer;
begin
clrscr;
readln(n);
for i:=1 to n do
readln(a[i]);
for i:=1 to n do
if a[i] <0 then
begin
d:=d+1;
t:=t+a[i];
end;
writeln('Tong la:',t/n:2:4);
write('Co tat ca so so am la:',d);
readln;
end.
uses crt;
var i,n,n,d: integer;
t: real;
A: array[1..32000] of integer;
begin
clrscr;
readln(n);
for i:=1 to n do
readln(a[i]);
for i:=1 to n do
if a[i] <0 then
begin
d:=d+1;
t:=t+a[i];
end;
writeln('Tong la:',t/n:2:4);
write('Co tat ca so so am la:',d);
readln;
end.