07/07/25 16:43:30
>>874
#include <stdio.h>
void main(){
int buf = 0;
int count = 0;
int total = 0;
printf("番号 数学 英語 合計\n");
while(scanf("%d",&buf)) {
if(buf == 0)
break;
count++;
printf("%d ", buf);
total += buf;
if(!(count%3)){
printf("%d\n", total);
total = 0;
}
}
}
なんにもエラー処理してないけどこんなんでいいかな・・・