Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import javax.swing.*;
- class NumeroP
- {
- public static void main (String[] args) {
- int num;
- num=Integer.parseInt(JOptionPane.showInputDialog("Ingrese numero"));
- if(num%2==0)
- {
- JOptionPane.showMessageDialog(null,"El numero es par");
- }else JOptionPane.showMessageDialog(null,"El numero es impar");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement