0 bình luận về “Viết chương trình tính chu vi bình hành”
Program hinh_binh_hanh; Uses Crt; Var a,b,s,c: real; Begin Clrscr; Writeln(‘ TINH CHU VI HÌNH BINH HANH:’); Write(‘Nhap chieu dai=’); readln(a); Write(‘Nhap chieu rong=’); readln(b); c:=(a+b)*2; Writeln(‘chu vi hinh binh hanh t la:’,c:6:2);
Program NN; Uses crt; Var a,b,p: real; Begin Clrscr; Write(‘Nhap do dai 2 canh ben: ‘); Readln(a,b); p:=(a+b)*2; Write(‘Chu vi la: ‘,p:0:2); Readln End.
Program hinh_binh_hanh;
Uses Crt;
Var a,b,s,c: real;
Begin
Clrscr;
Writeln(‘ TINH CHU VI HÌNH BINH HANH:’);
Write(‘Nhap chieu dai=’); readln(a);
Write(‘Nhap chieu rong=’); readln(b);
c:=(a+b)*2;
Writeln(‘chu vi hinh binh hanh t la:’,c:6:2);
readln(c);
End.
Program NN;
Uses crt;
Var a,b,p: real;
Begin
Clrscr;
Write(‘Nhap do dai 2 canh ben: ‘); Readln(a,b);
p:=(a+b)*2;
Write(‘Chu vi la: ‘,p:0:2);
Readln
End.