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