题解 | #班级成绩输入输出#
班级成绩输入输出
https://www.nowcoder.com/practice/60d96b08e1cb42e38629d54e37eac008
#include <stdio.h> int main() { float arr[5][5] = { 0.0 }; int i = 0, j = 0; for (i = 0; i < 5; i++) { float sum = 0.0; for (j = 0; j < 5; j++) { scanf("%f", &arr[i][j]); sum += arr[i][j]; printf("%.1f ", arr[i][j]); if (j == 4) { printf("%.1f\n", sum); } } } return 0; }