Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- for (int i = 0; i <= 4; i++) {
- nomes[i] = JOptionPane.showInputDialog("Informe o nome");
- idades[i] = int.parseInt(JOptionByte.showInputDialog("Informe a idade"));
- if (idades[i] < idades[maisJovem]) {
- maisJovem = i;
- }
- JOptionPane.showMessageDialog(null, nomes[maisJovem] + " é mais jovem e tem " + idades[maisJovem] + " anos.");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement