fork download
  1. #include <stdio.h>
  2. int main()
  3. {
  4. int korean;
  5. int math, english, total;
  6. float average;
  7. int science = 93, history = 97;
  8. char grade = 'A';
  9. korean = 91, math = 94, english = 92
  10. total = korean + math + ENGLISH + science + history;
  11. print("총점: %d, 평균: %1f, 등급: %c\",total,average,grade);
  12. )
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.c: In function ‘main’:
prog.c:10:1: error: expected ‘;’ before ‘total’
 total = korean + math + ENGLISH + science + history;
 ^~~~~
prog.c:11:1: warning: implicit declaration of function ‘print’ [-Wimplicit-function-declaration]
 print("총점: %d, 평균: %1f, 등급: %c\",total,average,grade);
 ^~~~~
prog.c:11:7: warning: missing terminating " character
 print("총점: %d, 평균: %1f, 등급: %c\",total,average,grade);
       ^
prog.c:11:7: error: missing terminating " character
 print("총점: %d, 평균: %1f, 등급: %c\",total,average,grade);
       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
prog.c:12:1: error: expected ‘;’ at end of input
 )
 ^
prog.c:12:1: error: expected declaration or statement at end of input
prog.c:8:6: warning: unused variable ‘grade’ [-Wunused-variable]
 char grade = 'A';
      ^~~~~
prog.c:7:19: warning: unused variable ‘history’ [-Wunused-variable]
 int science = 93, history = 97;
                   ^~~~~~~
prog.c:7:5: warning: unused variable ‘science’ [-Wunused-variable]
 int science = 93, history = 97;
     ^~~~~~~
prog.c:6:7: warning: unused variable ‘average’ [-Wunused-variable]
 float average;
       ^~~~~~~
prog.c:5:20: warning: unused variable ‘total’ [-Wunused-variable]
 int math, english, total;
                    ^~~~~
prog.c:5:11: warning: variable ‘english’ set but not used [-Wunused-but-set-variable]
 int math, english, total;
           ^~~~~~~
prog.c:5:5: warning: variable ‘math’ set but not used [-Wunused-but-set-variable]
 int math, english, total;
     ^~~~
prog.c:4:5: warning: variable ‘korean’ set but not used [-Wunused-but-set-variable]
 int korean;
     ^~~~~~
stdout
Standard output is empty