Uses crt;
Var dai,rong:integer;
Procedure Nhap(Var dai:integer;rong:integer);
Begin
Write('Chieu dai: ');readln(dai);
Write('Chieu rong: ');readln(rong);
End;
Procedure Ve(var dai:integer;rong:integer);
var i,j:integer;
Begin
for i:= 1 to dai do write('*');writeln;
For i:= 1 to rong-2 do
Begin
Write('*');
for j:=1 to dai-2 do write(' ');
writeln('*');
end;
for i:= 1 to dai do write('*');
End;
Begin
clrscr;
Nhap(dai,rong);
Ve(dai,rong);
readln;
End.
uses crt;
var a,b:integer;
{-----------------chuong-trinh-con--------------------}
procedure ve(x,y:integer);
var i,j:integer;
begin
for i:=1 to x do
begin
for j:=1 to y do
write('*');
writeln;
end;
end;
{----------------------chuong-trinh-chinh----------------------}
begin
clrscr;
write('Dai='); readln(a);
write('Rong='); readln(b);
ve(a,b);
readln;
end.