Created
May 20, 2013 13:00
-
-
Save gmfc/5612083 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.*; | |
| class maior{ | |
| public static void main(String args[]){ | |
| int a,b; | |
| a = Integer.parseInt(JOptionPane.showInputDialog("Entre com o 1° número")); | |
| b = Integer.parseInt(JOptionPane.showInputDialog("Entre com o 2° número")); | |
| JOptionPane.showMessageDialog(null,"O maior dentre os 2 é: "+devmaior(a,b)); | |
| } | |
| public static int devmaior(int a, int b){ | |
| a=(a>b)?a:b; | |
| return a; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment