Simple C++ Program for Print Inverted Left Triangle Pattern

Simple C++ Program for Print Inverted Left Triangle Pattern

/*## Simple C++ Program for Print Inverted Left Triangle Pattern*/
/*## Basic Pattern C++ Programs,Inverted Left Triangle Pattern C++ Programming*/

// Header Files
#include <iostream>
#include<conio.h>

using namespace std;

int main() {

    // Declare Variables
    int rows, i, j;

    cout << "Simple C++ Program for Print Inverted Left Triangle Pattern\n";

    //Read Day Value
    cout << "Enter the number of rows : ";
    cin>>rows;

    //Print Inverted Left Triangle Pattern 
    for (i = rows; i > 0; i--) {
        for (j = 0; j < i; j++) {
            cout << "* ";
        }
        cout << "\n";
    }
    getch();
    return 0;
}

Sample Output

Enter the number of rows : 7
*******
******
*****
****
***
**
*