题解 | #班级成绩输入输出#
班级成绩输入输出
http://www.nowcoder.com/practice/60d96b08e1cb42e38629d54e37eac008
int main() {
double val[5][5], sum = 0;
for (int i = 0; i < 5; i++) {
for (int j = 0; j < 5; j++) {
scanf("%lf ", &val[i][j]);
sum += val[i][j];
printf("%.1f ", val[i][j]);
}
printf("%.1f \n", sum);
sum = 0;
}
return 0;
}