fork download
  1. #include <stdio.h>
  2.  
  3. main()
  4. {
  5. int time_t=1;
  6.  
  7. while ( time_t < 24 )
  8. {
  9. If(time_t=8 || time_t=17);
  10. printf("Hello, it's time to eat\n", time_t );
  11. else
  12. printf("I do what i want\n", time_t);
  13. time_t = time_t +1;
  14. }
  15. }
  16.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.c:3:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
 main()
 ^~~~
prog.c: In function ‘main’:
prog.c:9:8: warning: implicit declaration of function ‘If’ [-Wimplicit-function-declaration]
        If(time_t=8 || time_t=17);
        ^~
prog.c:9:29: error: lvalue required as left operand of assignment
        If(time_t=8 || time_t=17);
                             ^
prog.c:10:15: warning: too many arguments for format [-Wformat-extra-args]
        printf("Hello, it's time to eat\n", time_t );
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~
prog.c:11:8: error: ‘else’ without a previous ‘if’
        else
        ^~~~
prog.c:12:15: warning: too many arguments for format [-Wformat-extra-args]
        printf("I do what i want\n", time_t);
               ^~~~~~~~~~~~~~~~~~~~
stdout
Standard output is empty