fork download
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4. int main(void) {
  5. int a, b, c;
  6.  
  7. printf("세 과목 점수를 입력하세요: ");
  8. scanf("%d %d %d", &a, &b,&c);
  9.  
  10. int avg = (a+b+c)/3;
  11.  
  12.  
  13. if (avg >= 60) {
  14. printf("합격입니다! 평균 = %d\n",avg);
  15. } else {
  16. printf("불합격입니다. 평균 = %d\n",avg);
  17. }
  18.  
  19. return 0;
  20.  
  21. }
  22.  
Success #stdin #stdout 0s 5316KB
stdin
70 80 90 
stdout
세 과목 점수를 입력하세요: 합격입니다! 평균 = 80