fork download
  1. #include<iostream>
  2. using namespace std;
  3.  
  4. int main()
  5. {
  6.  
  7. int e=1;
  8.  
  9. cout<<"\"Triangle Shape SHAPE \":\n\n";
  10.  
  11. for (int a=1;a<=5;a++)
  12. {
  13. for (int b=4;b>a;b--)
  14. {
  15. cout<<" "; //Priniting Space Here
  16. }
  17. for (int c=0;c<e;c++)
  18. {
  19. cout<<"*"; //Printing asterisk here endl;
  20. }
  21. cout<<endl; //new line
  22. e=e+2;
  23. }
  24. }
  25.  
  26.  
Success #stdin #stdout 0s 3340KB
stdin
Standard input is empty
stdout
"Triangle Shape SHAPE ":

   *
  ***
 *****
*******
*********