package tare;
public class Tare {
public static void main(String[] args) {
int[][] array={ {1,2,3,4,5}, {6,7,8,9,10},{11,12,13,14,15},{16,17,18,19,20},{21,22,23,24,25}};
for (int i=0; i<(array.length); i++ ) {
for (int j=0;j<array[i].length;j++)
System.out.println(array[i][j]);
}
}
}
import java.util.Random;
public class Matriz5x5 {
public static void main(String[] args) {
int x,y;
String Cad="";
int Matriz[][]=new int[5][5];
Random na=new Random();
for(x=0;x<5;x++){
for(y=0;y<5;y++){
Matriz[x][y]=(int)Math.rint(na.nextDouble() * 200 + 100);
}
}
for(x=0;x<5;x++){
Cad="";
for(y=0;y<5;y++){
Cad=Cad+Matriz[x][y]+" ";
}
System.out.println(Cad);
}
}
}