a) Program dthinhtron;
uses crt;
var r,s:real;
BEGIN
clrscr;
writeln('Nhap ban kinh r: ');
readln(r);
s:=r*r*PI;
writeln('dien tich hin tron la: ',s:8:3,'m2);
readln
END.
b) Program Trung_binh_cong;
Uses crt;
Var a,b,c,d,tbc: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);
tbc:=(a+b+c+d)/4;
Writeln('Trung binh cong cua bon so la:',tbc);
Readln
End.
b) 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):10:2);
Readln
a)Program Dien_tich_hinh_tron;
Uses crt;
Var s,r:real;
Const pi=3,14;
Begin
clrscr;
Write('Nhap ban kinh hinh tron la:'); Readln(r);
s:=r*r*pi;
Writeln('Dien tich hinh tron la:',s);
Readln
End.