Guest User

Untitled

a guest
Dec 11th, 2018
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. import javax.swing.JOptionPane;
  2.  
  3.  
  4. public class Ejercicio5 {
  5. public static void main(String[] args) {
  6. while (10 > 0) {
  7. int numero = Integer.parseInt(JOptionPane.showInputDialog("Numero"));
  8. if (numero == 0) {
  9. break;
  10. }
  11. if(numero % 2 == 0){
  12. System.out.println("el numero es par");
  13. }
  14. else {
  15. System.out.println("el numero es impar");
  16. }
  17.  
  18. }
  19. }
  20. }
Add Comment
Please, Sign In to add comment