Answers for "program to print inverted number pyramid in c++"

C++
0

inverted half pyramid in c++

#include <iostream>
using namespace std;
int main()
{
    int num;
    
    cout<< "Enter length of star pattern: ";
    cin >> num;

    for (int i=num; i>=1; i--)
    {
        for (int j = 0; j < i; j++)
        {
            cout<< "*";
        }
        cout << endl;
    }

    return 0;
}
Posted by: Guest on July-17-2021

Code answers related to "program to print inverted number pyramid in c++"

Browse Popular Code Answers by Language