➽ Problem:-

https://www.hackerrank.com/challenges/staircase/problem

➽ Solution:-

#include<bits/stdc++.h>

using namespace std;

int main()

{

    int N;

    cin >> N;

    int i,j,k;

    for(i=1;i<=N;i++)

    {

        for(j=1;j<=N-i;j++)

        {

            cout << " ";

        }

        for(k=j;k<=N;k++)

        {

            cout << "#";

        }

        cout << "\n";

    }

    return 0;

}