fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main()
  5. {
  6. int e=1;
  7. for (int a=1;a<=5;a++)
  8. {
  9. for (int b=4;b>=a;b--)
  10. {
  11. cout<<" ";}
  12. }
  13. for (int c=0;c<e;c++)
  14. {
  15. cout<<"*" // Printing asterisk here
  16. }
  17. cout<<end1; // new line
  18. e=e+2;
  19. }
  20. }
  21. return 0;
  22. }
Compilation error #stdin compilation error #stdout 0s 3296KB
stdin
Standard input is empty
compilation info
prog.cpp: In function ‘int main()’:
prog.cpp:16:3: error: expected ‘;’ before ‘}’ token
   }
   ^
prog.cpp:17:9: error: ‘end1’ was not declared in this scope
   cout<<end1; // new line
         ^
prog.cpp: At global scope:
prog.cpp:20:1: error: expected declaration before ‘}’ token
 }
 ^
stdout
Standard output is empty