program Mang;
uses crt;
var a,b: array[1..10000] of integer;
n,i: integer;
function dientich(a,b: integer):integer;
begin
dientich:=a*b;
end;
function chuvi(a,b: integer):integer;
begin
chuvi:=(a+b)*2;
end;
begin
clrscr;
write('Nhap so hinh chu nhat= ');readln(n);
for i:=1 to n do
begin
write('Chieu dai hcn thu ',i,': ');readln(a[i]);
write('Chieu rong hcn thu ',i,': ');readln(b[i]);
end;
writeln('----------------------');
for i:=1 to n do
begin
writeln('Dientich hcn thu ',i,': ',dientich(a[i],b[i]));
writeln('Chuvi hcn thu ',i,': ',chuvi(a[i],b[i]));
end;
readln;
end.