import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc=new Scanner(System.in); //int n=sc.nextInt(); double[][] array=new double[5][5]; double[] sum=new double[5]; sum[0]=0.0; for(int i=0;i<5;i++) { for(int j=0;j<5;j++) { array[i][j]=sc.nextDouble(); sum[i]=array[i][j]+sum[i]; } } for(int i=0;i<5;i++) { for(int j=0;j<5;j++) { System.out.printf("%.1f ",array[i][j]); } System.out.printf("%.1f ",sum[i]); System.out.println(); } } }