Progam trung_binh_cong
uses crt;
var a,b,c:real;
begin
clrscr
write(nhap so a,b,c=’,)readln(a,b,c)
writeln(‘trung binh cong cua ba so=’,(a+b+c)/3;
readln;
end
phuongthao:
Progam trung_binh_cong
uses crt;
var a,b,c:real;
begin
clrscr
write(nhap so a,b,c=’,)readln(a,b,c)
writeln(‘trung binh cong cua ba so=’,(a+b+c)/3;
readln;
end
phuongthao:
Progam trung_binh_cong
uses crt;
var a,b,c:real;
begin
clrscr
write(nhap so a,b,c=’,)readln(a,b,c)
writeln(‘trung binh cong cua ba so=’,(a+b+c)/3;
readln;
end
tham khảo
Progam trung_binh_cong
uses crt;
var a,b,c:real;
begin
clrscr
write(nhap so a,b,c=’,)readln(a,b,c)
writeln(‘trung binh cong cua ba so=’,(a+b+c)/3;
readln;
uses crt;
var a:array[1..100]of integer;
i,n,t:integer;
begin
clrscr;
readln(n);
for i:=1 to n do readln(a[i]);
t:=0;
for i:=1 to n do t:=t+a[i];
writeln(t/n:4:2);
readln;
end.