program Trung_Binh_Cong;
uses crt;
var t1,t2,t3,t4,tong: real;
begin
clrscr;
write('nhap so thu nhat =');
readln(t1);
write('nhap so thu hai =');
readln(t2);
write('nhap so thu ba =');
readln(t3);
write('nhap so thu tu =');
readln(t4);
tong:=t1+t2+t3+t4;
write('Trung binh cong cua 4 so = ' ,tong div 4);
readln;
end.
Program TB_Cong_4_So;
uses crt;
Var a, b, c, d: real;
Begin
Clrscr;
Write('Nhap so thu nhat:');readln(a);
Write('Nhap so thu hai:');readln(b);
Write('Nhap so thu ba:');readln(c);
Write('Nhap so thu tu:');readln(d);
Writeln('Trung binh cong: ',(a+b+c+d)/4);
Readln;
End.
Bước 1: Nhập a,b,c,d
Bước 2: t←(a+b+c+d)/4;
Bước 3: Xuất t
Bước 4: Kết thúc