#include <iostream>
#include <iomanip>
using namespace std;
int main()
{
int m=0, n=0;
double arr[100][100] = { {0} };
for (int m = 0; m < 5; m++)
{
for (int n = 0; n < 5; n++)
{
cin >> arr[m][n];
}
}
for (int m = 0; m < 5; m++)
{
for (int n = 0; n < 5; n++)
{
arr[m][5] += arr[m][n];
}
}
for (int m = 0; m < 5; m++)
{
for (int n = 0; n < 6; n++)
{
cout <<fixed<<setprecision(1)<<arr[m][n] <<" ";
}
cout << endl;
}
}
#include <iomanip>
using namespace std;
int main()
{
int m=0, n=0;
double arr[100][100] = { {0} };
for (int m = 0; m < 5; m++)
{
for (int n = 0; n < 5; n++)
{
cin >> arr[m][n];
}
}
for (int m = 0; m < 5; m++)
{
for (int n = 0; n < 5; n++)
{
arr[m][5] += arr[m][n];
}
}
for (int m = 0; m < 5; m++)
{
for (int n = 0; n < 6; n++)
{
cout <<fixed<<setprecision(1)<<arr[m][n] <<" ";
}
cout << endl;
}
}