declare @i int
declare @j int
declare @k int
declare @totLine int
declare @res varchar(100)
declare @showingCharacter varchar(1)
set @showingCharacter = '#'
set @totLine = 20
set @i = 1
set @j = 1
set @k = 1
set @res = ''
while(@k <= (@totLine))
begin
set @res = @res + '# '
set @k = @k + 1
end
print @res
set @res = ''
while(@i <= (@totLine - 2))
begin
set @res = '# ' + REPLICATE(' ',@totLine - 2) + '# '
set @i = @i + 1
print @res
end
print @res
set @res = ''
set @k = 1
while(@k <= (@totLine))
begin
set @res = @res + '# '
set @k = @k + 1
end
print @res
set @res = ''
# # # # # # # # # # # # # # # # # # # #
# #
# #
# #
# #
# #
# #
# #
# #
# #
# #
# #
# #
# #
# #
# #
# #
# #
# #
# #
# # # # # # # # # # # # # # # # # # # #
No comments:
Post a Comment