fork download
  1. #include <stdio.h>
  2.  
  3. //MTG starting health
  4.  
  5. int main() {
  6.  
  7. int health;
  8.  
  9. for (health=0, health<=20, health++)
  10. printf("health is %d \n" health);
  11.  
  12. return 0;
  13. }
  14.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.c: In function ‘main’:
prog.c:9:15: warning: right-hand operand of comma expression has no effect [-Wunused-value]
  for (health=0, health<=20, health++)
               ^
prog.c:9:37: error: expected ‘;’ before ‘)’ token
  for (health=0, health<=20, health++)
                                     ^
prog.c:9:37: error: expected expression before ‘)’ token
prog.c:10:28: error: expected ‘)’ before ‘health’
   printf("health is %d \n" health);
                            ^~~~~~
prog.c:10:22: warning: format ‘%d’ expects a matching ‘int’ argument [-Wformat=]
   printf("health is %d \n" health);
                      ^
stdout
Standard output is empty