Problem Solving/Algorithms/Staircase.cpp
// Complete the staircase function below.
Complete the staircase function below.
Complete the staircase function below .
void staircase(int n) {
 for(int i=1;i<n+1;i++)
    {
        for(int k=1;k<=n-i;k++)
    {
        cout<<" ";
    }
            for(int l=i;l>0;l--)
            {
                cout<<"#";
            }
        cout<<endl;
    }
}
void staircase ( int n ) { for ( int i = 1 ; i < n + 1 ; i ++ ) { for ( int k = 1 ; k <= n - i ; k ++ ) { cout << " " ; } for ( int l = i ; l > 0 ; l -- ) { cout << " " ; } cout << endl ; } }
Complete the staircase function below.
Complete the staircase function below .