#include <stdio.h>
#define DATANUM 5
int main(){
typedef struct Seiseki{
int eigo;
int kokugo;
int sugaku;
float average;
} SEISEKI;
SEISEKI score[DATANUM];
int i;
/* 英語と国語と数学の点数を DATANUM 個読み込み、3科目の平均値を計算する */
for (i=0;i<DATANUM;i++){
scanf("%d",&(score
[i
].
eigo)); scanf("%d",&(score
[i
].
kokugo)); scanf("%d",&(score
[i
].
sugaku)); score[i].average = ((score[i].eigo) + (score[i].kokugo) + (score[i].sugaku))/3;
}
/* 3科目の平均値を表示する */
for (i=0;i<DATANUM;i++){
printf("%d 人目の人の3 科目平均は%3.1f です。\n",i
+1, score
[i
].
average); }
}
I2luY2x1ZGUgPHN0ZGlvLmg+CiNkZWZpbmUgREFUQU5VTSA1CgppbnQgbWFpbigpewoJCgl0eXBlZGVmIHN0cnVjdCBTZWlzZWtpewoJCWludCBlaWdvOwoJCWludCBrb2t1Z287CgkJaW50IHN1Z2FrdTsKCQlmbG9hdCBhdmVyYWdlOwoJfSBTRUlTRUtJOwoJU0VJU0VLSSBzY29yZVtEQVRBTlVNXTsKCWludCBpOwoJCgkvKiDoi7Hoqp7jgajlm73oqp7jgajmlbDlrabjga7ngrnmlbDjgpIgREFUQU5VTSDlgIvoqq3jgb/ovrzjgb/jgIEz56eR55uu44Gu5bmz5Z2H5YCk44KS6KiI566X44GZ44KLICovCglmb3IgKGk9MDtpPERBVEFOVU07aSsrKXsKCQlzY2FuZigiJWQiLCYoc2NvcmVbaV0uZWlnbykpOwoJCXNjYW5mKCIlZCIsJihzY29yZVtpXS5rb2t1Z28pKTsKCQlzY2FuZigiJWQiLCYoc2NvcmVbaV0uc3VnYWt1KSk7CgkJc2NvcmVbaV0uYXZlcmFnZSA9ICgoc2NvcmVbaV0uZWlnbykgKyAoc2NvcmVbaV0ua29rdWdvKSArIChzY29yZVtpXS5zdWdha3UpKS8zOwoJfQoJCgkvKiAz56eR55uu44Gu5bmz5Z2H5YCk44KS6KGo56S644GZ44KLICovCglmb3IgKGk9MDtpPERBVEFOVU07aSsrKXsKCQlwcmludGYoIiVkIOS6uuebruOBruS6uuOBrjMg56eR55uu5bmz5Z2H44GvJTMuMWYg44Gn44GZ44CCXG4iLGkrMSwgc2NvcmVbaV0uYXZlcmFnZSk7Cgl9Cn0=