upside down filled isosceles triangle code C++

Write a program which display upside down isosceles triangle using nested for loop and asterisk character
Output should be look like below image

C++ code:

using namespace std;

int main()
  int e=9;

  cout<<"\"Upside Down Triangle\":\n\n";

  for(int a=1;a<=5;a++)
    for(int b=0;b<e;b++)
    cout<<"*";  // printing asterisk character

      for(int c=0;c<a;c++)
      cout<<" ";  // printing space here

 return 0;

Sample Output:
sample output

More C++ Shapes Here


Hopefully the information we provide can be useful.

Press ESC to close