10 Days of HackeRank's challenges- Day 6
I am a Web developer and a software engineering student of the Faculty of Engineering and Technology (FET) University of Buea. I am interested in innovative projects, open source and anything related to software development
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 https://github.com/Beri28/10-days-of-code/blob/main/daySix.js