We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Draw The Triangle 1
Draw The Triangle 1
Sort by
recency
|
1268 Discussions
|
Please Login in order to post a comment
Declare @i int =20 while @i>0 begin print REplicate('*',@i) set @i=@i-1 end
for ms sql server
with nums as ( select 1 as num union all select num + 1 from nums where num + 1 <= 20)
select replicate('* ', num) from nums order by num desc
For MySQL