Programa 24
Nombre: Javier Alejandro León Avalos
Grado y grupo: 3°G
Especialidad: Programación
Descripción del programa
• Programa en el cual se declaran, se les da valor e imprime Arreglos
Bidimensionales
Código
package arreglos;
import javax.swing.JOptionPane;
public class Ejercicio2 {
public static void ArreglosBidimensionales() { int n,m;
n=Integer.parseInt(JOptionPane.showInputDialog(null, "ESCRIBE LAS FILAS DEL ARREGLO"));
m=Integer.parseInt(JOptionPane.showInputDialog(null, "ESCRIBE LAS COLUMNAS DEL ARREGLO"));
int Arreglo[][]=new int [n][m];
for(int i=0;i<n;i++){
for(int j=0;j<m;j++){
Arreglo[i][j]=Integer.parseInt(JOptionPane.showInputDialog(null,"INGRESE ELVALOR "+"DEL ELEMENTO
ARREGLO["+i+"]"+"["+j+"]"));
}}
for(int i=0;i<n;i++){
for(int j=0;j<m;j++){
Object msj="ARREGLO [" + i + "]"+"[" + i + "]"+Arreglo[i][j];
JOptionPane.showInputDialog(null, msj, "SALIDA", JOptionPane.PLAIN_MESSAGE);
System.out.println("ARREGLO[" + i + "]" + j + "[" + "]="+Arreglo[i][j]);}}}
public static void main(String[] args) {
ArreglosBidimensionales();}}
Prueba de escritorio
Conclusiones
• Este programa nos ayuda a entender sobre los arreglos Bidimensionales y
como utilizarlos

Programa 24

  • 1.
    Programa 24 Nombre: JavierAlejandro León Avalos Grado y grupo: 3°G Especialidad: Programación
  • 2.
    Descripción del programa •Programa en el cual se declaran, se les da valor e imprime Arreglos Bidimensionales
  • 3.
    Código package arreglos; import javax.swing.JOptionPane; publicclass Ejercicio2 { public static void ArreglosBidimensionales() { int n,m; n=Integer.parseInt(JOptionPane.showInputDialog(null, "ESCRIBE LAS FILAS DEL ARREGLO")); m=Integer.parseInt(JOptionPane.showInputDialog(null, "ESCRIBE LAS COLUMNAS DEL ARREGLO")); int Arreglo[][]=new int [n][m]; for(int i=0;i<n;i++){ for(int j=0;j<m;j++){ Arreglo[i][j]=Integer.parseInt(JOptionPane.showInputDialog(null,"INGRESE ELVALOR "+"DEL ELEMENTO ARREGLO["+i+"]"+"["+j+"]")); }} for(int i=0;i<n;i++){ for(int j=0;j<m;j++){ Object msj="ARREGLO [" + i + "]"+"[" + i + "]"+Arreglo[i][j]; JOptionPane.showInputDialog(null, msj, "SALIDA", JOptionPane.PLAIN_MESSAGE); System.out.println("ARREGLO[" + i + "]" + j + "[" + "]="+Arreglo[i][j]);}}} public static void main(String[] args) { ArreglosBidimensionales();}}
  • 4.
  • 5.
    Conclusiones • Este programanos ayuda a entender sobre los arreglos Bidimensionales y como utilizarlos