Advertisement
Jaguartechno

Numero Par o Impar

Dec 2nd, 2016
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.34 KB | None | 0 0
  1. import javax.swing.*;
  2. class NumeroP
  3. {
  4.     public static void main (String[] args) {
  5.        
  6.       int num;
  7.      
  8.       num=Integer.parseInt(JOptionPane.showInputDialog("Ingrese numero"));
  9.      
  10.       if(num%2==0)
  11.       {
  12.         JOptionPane.showMessageDialog(null,"El numero es par");
  13.        
  14.       }else JOptionPane.showMessageDialog(null,"El numero es impar");
  15. }
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement