C/C++の宿題片付けます 135代目
■ このスレッドは過去ログ倉庫に格納されています
0155デフォルトの名無しさん
2010/04/09(金) 04:35:09int main(void)
{
int i, score[10], max, total;
for(i=0; i<10; i++) scanf("%d", score + i);
for(max=total=score[0],i=1; i<10; i++) {
total += score[i];
if(max < score[i]) max = score[i];
}
printf("平均成績:%g\n最高成績:%d\n", total/10.0, max);
return 0;
}
■ このスレッドは過去ログ倉庫に格納されています