• + 0 comments

    Here is my c++ implementation, you can watch the video here : https://youtu.be/4yntFcMY30U

    #include <bits/stdc++.h>
    
    using namespace std;
    
    int main()
    {
        int n;
        cin >> n;
        for(int i = 1; i <= n; i++) {
            string s(n-i, ' '), e(i, '#');
            cout << s + e << endl;
        }
    
        return 0;
    }