-
-
Save godie007/2216631 to your computer and use it in GitHub Desktop.
trabajo paradigma
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import javax.swing.JOptionPane; | |
| public class ejercicio4 { | |
| public static void main(String[] args) | |
| { | |
| int valorA = Integer.parseInt(JOptionPane.showInputDialog("ingrese valorA")); | |
| int valorB = Integer.parseInt(JOptionPane.showInputDialog("ingrese valorB")); | |
| int valorC = Integer.parseInt(JOptionPane.showInputDialog("ingrese valorC")); | |
| if (valorA > valorB && valorA > valorC) | |
| { | |
| JOptionPane.showMessageDialog(null, "el valor A es el mayor"); | |
| } else if (valorA > valorC && valorA > valorA) | |
| { | |
| JOptionPane.showMessageDialog(null, "el valor B es el mayor"); | |
| } else if (valorA > valorA && valorA > valorB) | |
| { | |
| JOptionPane.showMessageDialog(null, "el valor C es el mayor"); | |
| } | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import javax.swing.JOptionPane; | |
| public class ejercicio5 { | |
| public static void main(String[] args) { | |
| double nota = Double.parseDouble(JOptionPane.showInputDialog("ingrese nota")); | |
| if (nota < 0 || nota > 5) { | |
| JOptionPane.showMessageDialog(null, "Advertencia", "Rango invalido", JOptionPane.ERROR_MESSAGE); | |
| } | |
| if (nota > 0 && nota < 2) { | |
| JOptionPane.showMessageDialog ( null, | |
| "el estudiante no puede habilitar !piede¡"); | |
| }else if (nota >= 2 && nota <= 2.99) { | |
| JOptionPane.showMessageDialog ( null, | |
| "el estudiante pierde !puede habilitar¡"); | |
| }else if (nota >= 3 && nota <= 5) { | |
| JOptionPane.showMessageDialog ( null, | |
| "el estudiante Aprobo la signatura"); | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment