program Hinh_chu_nhat;
uses crt;
var a,b,S: integer;
begin
writeln('Nhap chieu dai:');
readln(a);
writeln('Nhap chieu rong:');
readln(b);
S:=(a*b);
writeln('Dien tich la:',S);
readln
end.
bài này mình làm theo kiểu hình chữ nhật abcd nhé
uses crt;
var ab,bc,cd,ad,s:integer;
ac,bd:real;
begin
clrscr;
write('nhap chieu dai:'); readln(ab);
write('nhap chieu rong:'); readln(bc);
s:=ab*bc;
writeln('dien tich hinh chu nhat la: ',s);
{-----------tinh-cac-duong-cheo-ac-va-bd-------------}
cd:=ab;
ad:=bc;
ac:=sqrt(sqr(ad)+sqr(cd));
writeln('do dai duong cheo ac la: ',ac:4:2);
bd:=sqrt(sqr(ab)+sqr(ad));
writeln('do dai duong cheo bd la: ',bd:4:2);
readln;
end.