Resolver un programa para ingresar el código , nombre y 4 notas de un estudiante
Publicado por Aldair (2 intervenciones) el 06/10/2020 15:33:38
1.- Resolver un programa para ingresar el código , nombre y 4 notas de un estudiante; mostrar su promedio, su nota mas baja y la mas alta
hasta el momento voy esto:
hasta el momento voy esto:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
String nom, resul;
int indi,codigo;
int not1,not2,not3,not4;
double prom = 0;
nom=(JOptionPane.showInputDialog("Ingrese su Nombre: "));
codigo=Integer.parseInt(JOptionPane.showInputDialog("Ingrese Codigo"));
not1=Integer.parseInt(JOptionPane.showInputDialog("Ingrese nota 1: "));
not2=Integer.parseInt(JOptionPane.showInputDialog("Ingrese nota 2: "));
not3=Integer.parseInt(JOptionPane.showInputDialog("Ingrese nota 3: "));
not4=Integer.parseInt(JOptionPane.showInputDialog("Ingrese nota 4: "));
prom=(not1+not2+not3+not4)/4;
System.out.println("Nombre: "+ nom);
System.out.println("El codigo ingresado es: "+codigo);
System.out.println("El promedio es : "+prom);
JOptionPane.showMessageDialog(null,"El promedio es :"+prom);
{
}
Valora esta pregunta


0