fork download
  1. #include <stdio.h>
  2. int main()
  3. int age;
  4. scanf ("%d", age);
  5. if (1<=age && 5>=age){
  6. printf ("Languages\n");
  7. }
  8. if else (6==age or 7==age);
  9. printf ("(Read and Write\n)");
  10. }
  11. if else (8<=age or 12>=age);
  12. printf ("(Robotics\n)");
  13. }
  14. if else (13<=age or 19>=age);
  15. printf ("(Programming and Robotics\n)");
  16. }
  17. if else (20<=age);
  18. printf ("(Read about everything\n)");
  19. }
  20. return 0;
  21. }
  22.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp:3:1: error: expected initializer before ‘int’
 int age;
 ^~~
prog.cpp:4:7: error: expected constructor, destructor, or type conversion before ‘(’ token
 scanf ("%d", age);
       ^
prog.cpp:5:1: error: expected unqualified-id before ‘if’
 if (1<=age && 5>=age){
 ^~
prog.cpp:8:1: error: expected unqualified-id before ‘if’
 if else (6==age or 7==age);
 ^~
prog.cpp:9:8: error: expected constructor, destructor, or type conversion before ‘(’ token
 printf ("(Read and Write\n)");
        ^
prog.cpp:10:1: error: expected declaration before ‘}’ token
 }
 ^
stdout
Standard output is empty