Advertisement
Guest User

Untitled

a guest
Aug 29th, 2014
234
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. for (int i = 0; i <= 4; i++) {
  2. nomes[i] = JOptionPane.showInputDialog("Informe o nome");
  3. idades[i] = int.parseInt(JOptionByte.showInputDialog("Informe a idade"));
  4.  
  5. if (idades[i] < idades[maisJovem]) {
  6. maisJovem = i;
  7. }
  8.  
  9. JOptionPane.showMessageDialog(null, nomes[maisJovem] + " é mais jovem e tem " + idades[maisJovem] + " anos.");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement