fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. int x,n;
  6. for(n=10;n<=20;n++)
  7. }
  8. if(n%x==2) cout<<n<<" ";
  9. }
  10. return 0;
  11. }
Compilation error #stdin compilation error #stdout 0s 15232KB
stdin
Standard input is empty
compilation info
prog.cpp: In function ‘int main()’:
prog.cpp:7:1: error: expected primary-expression before ‘}’ token
 }
 ^
prog.cpp: At global scope:
prog.cpp:8:1: error: expected unqualified-id before ‘if’
 if(n%x==2) cout<<n<<" ";
 ^~
prog.cpp:9:1: error: expected declaration before ‘}’ token
 }
 ^
stdout
Standard output is empty