i have to print
1 3 2 4 5 i the input
output should be
1 3 2 4 5
4 5 6 9
9 11 15
20 26
i am getting a weird output
my code is
import java.io.*;
class nik1234
{
public static void main(String args[])throws IOException
{
int i,j;
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
int arr[][]=new int [20][20];
for( j=5;j>0;j--)
{
i=0;
arr[i][j]=Integer.parseInt(br.readLine());
}
for(j=5;j>0;j--)
{
i=0;
System.out.print("\t"+arr[i][j]);
}
for(j=5;j>0;j--)
{
i=0;
while(i<5)
{
int c=arr[i][j]+arr[i][j-1];
System.out.print(c);
i++;
}
System.out.println();
}
}
}
please help me modify program accordingly thank you in advance