fork download
  1. #include <iostream>
  2. using namespace std; // consider removing this line in serious projects
  3.  
  4. int main{
  5. int n,a,i;
  6. int s=0;
  7. int i=1;
  8. cin>>n;
  9. while(i>n){
  10. cin>>a
  11. if a%5==0 && f%10=2 {
  12. con<<a
  13. }
  14. return 0 }
  15. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
5
2
10
45
11
50
compilation info
prog.cpp:4:5: error: cannot declare ‘::main’ to be a global variable
 int main{
     ^~~~
prog.cpp:5:2: error: expected primary-expression before ‘int’
  int n,a,i;
  ^~~
prog.cpp:5:2: error: expected ‘}’ before ‘int’
prog.cpp:8:2: error: ‘cin’ does not name a type
  cin>>n;
  ^~~
prog.cpp:9:2: error: expected unqualified-id before ‘while’
  while(i>n){
  ^~~~~
stdout
Standard output is empty