fork download
  1. #include<stdio.h>
  2.  
  3. int n;
  4. main(){
  5. printf("Enter your age for qualification:");
  6. scanf("Xd",&n);
  7. if (n>=0 && n<=17);{
  8. if (n<=0);
  9. printf("You're still in your mother's womb");
  10. if-else(n>=1 && n<=17);
  11. printf("you're too young! you're not qualified!");
  12. if else(n>=18 && n<=120);
  13. printf("you're qualified to vote");
  14. }
  15. if else(n>=121);
  16. printf("that's impossible! you're already dead!");
  17. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp: In function 'int main()':
prog.cpp:10:7: error: expected '(' before '-' token
     if-else(n>=1 && n<=17);
       ^
prog.cpp:12:8: error: expected '(' before 'else'
     if else(n>=18 && n<=120);
        ^
prog.cpp:15:4: error: expected '(' before 'else'
 if else(n>=121);
    ^
stdout
Standard output is empty