0% found this document useful (0 votes)
18 views1 page

Ejercicio (Matriz) Promedios

Uploaded by

Luis Rumiche
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views1 page

Ejercicio (Matriz) Promedios

Uploaded by

Luis Rumiche
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

package javaapplication46;

import javax.swing.JOptionPane;
public class JavaApplication46 {
public static void main(String[] args) {

double num [][]=new double[5][3];


for(int i=0;i<5;i++){
for(int j=0 ; j<3 ; j++){
num[i][j]=Double.parseDouble(JOptionPane.showInputDialog("ingrese nota
en posicion " +i+ " " +j+"" ));
System.out.print(num[i][j]+" ");

}
System.out.println(" ");
}
double promedio=0;
for(int i=0;i<num.length;i++){
double suma=0;
for(int j=0;j<num[i].length;j++){
promedio= (suma += num[i][j])/num[i].length;

}
System.out.print("el promedio del alumno ["+i+"] es: " +promedio);
System.out.println("");
}

}
}

You might also like