➽ Problem:-
https://www.hackerrank.com/challenges/staircase/problem
➽ Solution:-
#include
<stdio.h>
#include
<string.h>
int main()
{
int N, i, j, k;
scanf("%d", &N);
for(i=1;i<=N;i++)
{
for(j=1;j<=N-i;j++)
{
printf(" ");
}
for(k=j;k<=N;k++)
{
printf("#");
}
printf("\n");
}
return 0;
}
0 Comments
Please do not enter any spam link in the comment section.