#C11456. Left-Aligned Staircase Pattern
Left-Aligned Staircase Pattern
Left-Aligned Staircase Pattern
Given a non-negative integer ( n ) (where ( n \geq 0 )), print a left-aligned staircase consisting of ( n ) steps. For each step ( i ) (with ( 1 \leq i \leq n )), print a line containing exactly ( i ) '#' characters. For example, if ( n = 4 ), the output should be:
# ## ### ####
If \( n = 0 \), no output should be produced.
inputFormat
The input consists of a single integer ( n ) read from standard input, which indicates the number of steps of the staircase.
outputFormat
Print ( n ) lines on standard output such that the ( i^{th} ) line contains ( i ) '#' characters. There should be no extra spaces or blank lines in the output.## sample
4
#
####
</p>