#include <stdio.h> int main() { double sum = 0; double arr[5][5] = { 0 }; int i = 0, j = 0; for (i = 0; i < 5; i++) { scanf("%lf %lf %lf %lf %lf", &arr[i][0], &arr[i][1], &arr[i][2], &arr[i][3], &arr[i][4]); } for (i = 0; i < 5; i++) { for (j = 0; j < 5; j++) { printf("%.1f ", arr[i][j]); sum += arr[i][j]; } printf("%.1f\n", sum); sum = 0; } return 0; }