inverted half pyramid in c 2b 2b

Solutions on MaxInterview for inverted half pyramid in c 2b 2b by the best coders in the world

showing results for - "inverted half pyramid in c 2b 2b"
Liam
21 Jul 2016
1#include <iostream>
2using namespace std;
3int main()
4{
5    int num;
6    
7    cout<< "Enter length of star pattern: ";
8    cin >> num;
9
10    for (int i=num; i>=1; i--)
11    {
12        for (int j = 0; j < i; j++)
13        {
14            cout<< "*";
15        }
16        cout << endl;
17    }
18
19    return 0;
20}