import java.util.Scanner;
class ArrayBidimension {
public static void main(String[]args){
Scanner scanner = new Scanner(System.in);
int[][] x = new int[][] {
{1, 20, 50, 100},
{2000, 7, 11, 21},
{30, 40, 200, 300},
{5, 10, 15, 90},
};
// cuarta fila segunda columna
int y = x[3][1];
System.out.println(y);
//segunda fila y tercera columna
int z = x[1][2];
System.out.println(z);
//Escribir la primera fila
for (int a = 0; a <= x.lenght; a++) {
System.out.print(x[0][a] + " ");
}
//escribir la segunda columna
for (int b = 0; b< x.length; b++) {
System.out.println(x[b][1]);
{
//escribir la quinta fila en orden inverso
for(int c = x[4].lenght -1; c >= 0; c--) {
System.out.print(x[4][c] + " ");
}
System.out.print();
//Escribir la primera columna en orden inverso
for(int d = x.length - 1; d >= 0; d--) {
System.out.print(x[d][0]);
{
//Escribir el array completo
for (int e = 0; e < x.lengt; e++) {
for (int f = 0; f < x[e].length; f++) {
System.out.print(x[e][0] + " ");
}
System.out.println();
}
//Sumar los valores de la primera fila
int t = 0;
for(int w = 0; w < x[0].lenth; W++) {
t = t + x[0][w];
}
System.out.println(t);
//Sumar los valores de la primera columna
int h = 0;
for (int j = 0; j < x.length; j++) {
h = h + x[j][0];
System.out.println(h);
{
scanner.close();
}
}

Fdmkdmfasmeofqw

  • 1.
    import java.util.Scanner; class ArrayBidimension{ public static void main(String[]args){ Scanner scanner = new Scanner(System.in); int[][] x = new int[][] { {1, 20, 50, 100}, {2000, 7, 11, 21}, {30, 40, 200, 300}, {5, 10, 15, 90}, }; // cuarta fila segunda columna int y = x[3][1]; System.out.println(y); //segunda fila y tercera columna int z = x[1][2]; System.out.println(z); //Escribir la primera fila for (int a = 0; a <= x.lenght; a++) { System.out.print(x[0][a] + " "); } //escribir la segunda columna for (int b = 0; b< x.length; b++) { System.out.println(x[b][1]); { //escribir la quinta fila en orden inverso for(int c = x[4].lenght -1; c >= 0; c--) { System.out.print(x[4][c] + " "); } System.out.print(); //Escribir la primera columna en orden inverso for(int d = x.length - 1; d >= 0; d--) { System.out.print(x[d][0]); { //Escribir el array completo for (int e = 0; e < x.lengt; e++) { for (int f = 0; f < x[e].length; f++) { System.out.print(x[e][0] + " "); } System.out.println(); } //Sumar los valores de la primera fila int t = 0; for(int w = 0; w < x[0].lenth; W++) { t = t + x[0][w]; } System.out.println(t); //Sumar los valores de la primera columna int h = 0; for (int j = 0; j < x.length; j++) { h = h + x[j][0]; System.out.println(h); {
  • 2.