fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. cout<<"Hello World!";
  6. {
  7. cout<<"Hello";
  8. cout<<"World";
  9. {
  10. cout<<"Hello\n";
  11. cout<<"World";
  12. {
  13. int a=3;
  14. float b=1.2;
  15. char anne='a';
  16. cout<<a<<endl;
  17. cout<<b<<endl;
  18. cout<<anne;
  19. {
  20. int a=5,b=3,sum;
  21. cout<<a<<endl;
  22. cout<<b<<endl;
  23. sum=a+b;
  24. cout<<"The sum is"<<sum;
  25. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp: In function ‘int main()’:
prog.cpp:25:1: error: expected ‘}’ at end of input
 }
 ^
prog.cpp:12:1: note: to match this ‘{’
 {
 ^
prog.cpp:25:1: error: expected ‘}’ at end of input
 }
 ^
prog.cpp:9:1: note: to match this ‘{’
 {
 ^
prog.cpp:25:1: error: expected ‘}’ at end of input
 }
 ^
prog.cpp:6:1: note: to match this ‘{’
 {
 ^
prog.cpp:25:1: error: expected ‘}’ at end of input
 }
 ^
prog.cpp:4:12: note: to match this ‘{’
 int main() {
            ^
stdout
Standard output is empty