10 Days of HackeRank's challenges- Day 6

Problem statement: Staircase.

Staircase detail

This is a staircase of size n=4:

#

##

###

####

Its base and height are both equal to n. It is drawn using # symbols and spaces. The last line is not preceded by any spaces.

Write a program that prints a staircase of size n, the # should be indented to the right, that is first line should have n-1 spaces before # and line 2 should have n-2 and so on .

Function Description

staircase has the following parameter(s):

int n: an integer

Here is a link to my solution github.com/Beri28/10-days-of-code/blob/main..