#include <stdio.h> int main() { float arr[6][6]={0}; int i = 0; for(i=0; i<5; i++) { float sum = 0.0; int j = 0; for(j=0; j<5; j++) { scanf("%f", &arr[i][j]); printf("%.1f ", arr[i][j]); sum+=arr[i][j];//边输入,边打印,边求和 } arr[i][j]=sum; printf("%.1f\n", arr[i][j]); } return 0; }