Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import javax.swing.JOptionPane;
- public class Ejercicio5 {
- public static void main(String[] args) {
- while (10 > 0) {
- int numero = Integer.parseInt(JOptionPane.showInputDialog("Numero"));
- if (numero == 0) {
- break;
- }
- if(numero % 2 == 0){
- System.out.println("el numero es par");
- }
- else {
- System.out.println("el numero es impar");
- }
- }
- }
- }
Add Comment
Please, Sign In to add comment