#include <stdio.h>
#include <string.h>
typedef struct {
char name[20];
int score[3];
} STUDENT;
int main() {
STUDENT std;
// 수정됨: 1. 쉼표 제거 2. std.name 변수 추가
scanf("%s %d %d %d", std.name, &std.score[0], &std.score[1], &std.score[2]);
float avg = 0;
for (int i = 0; i < 3; i++) {
avg += std.score[i];
}
avg /= 3.0;
printf("%s님 점수 평균: %.2f\n", std.name, avg);
return 0;
}
To embed this project on your website, copy the following code and paste it into your website's HTML: