ArrayP5 - int array = new int[5[5 for(i=0;i<5;i...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
import java.util.*; import java.lang.*; import java.io.*; import java.text.*; import java.math.*; import java.text.DecimalFormat; i public class ArrayP5 { static final int rows = 5; static final int columns = 5; static int i, j, n=1; public static void main(String[] args)
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: { int array = new int [5][5]; for (i=0;i<5;i++) { for (j=0;j<5;j++) { array[i][j]=n; n=n+1; } } for (j=0;j<5;j++) { for (i=0;i<5;i++) System.out.printf("%5s" ,array[i][j]+" "); System.out.println(); } } }...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online