Created
May 17, 2012 22:29
-
-
Save godie007/2721992 to your computer and use it in GitHub Desktop.
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 Ejercicio6 { | |
| public static void main(String[] args) { | |
| int a = Integer.parseInt(JOptionPane.showInputDialog("")); | |
| int b = Integer.parseInt(JOptionPane.showInputDialog("")); | |
| int c = Integer.parseInt(JOptionPane.showInputDialog("")); | |
| System.out.println(metodo(a, b, c)); | |
| } | |
| public static int metodo(int a, int b, int c) { | |
| int dato = 0; | |
| if (a > b && a > c) { | |
| dato = a; | |
| } else if (b > a && b >c) { | |
| dato = a; | |
| }else if (c > a && c > b) { | |
| dato = c; | |
| }return dato; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment