program DT_va_CV_hinh_vuong;
uses crt;
var a, b, c: integer;
begin
clrscr;
write('nhap canh hinh vuong a='); readln(a);
b:=a*4;
c:=a*a;
writeln('chu vi hinh vuong la: ',b);
writeln('dien tich hinh vuong la: ',c);
readln;
end.
uses crt;
var a,cv,dt:real;
begin
clrscr;
write('a='); readln(a);
cv:=a*4;
dt:=sqr(a);
if a>0 then
begin
writeln('chu vi hinh vuong la: ',cv);
writeln('dien tich hinh vuong la: ',dt);
end
else writeln('vui long nhap lai');
readln;
end.
program ho_tro;
uses crt;
var a,s,c: real;
begin
clrscr;
writeln(' nhap canh cua hinh vuong:');
s:=a*a;
c:=a*4;
writeln(' dien tich la hv la:',s);
writeln(' chu vi hv la:',c);
readln;
end.