import javax.swing.JOptionPane;
public class compara_ay_b {
    public static void main(String[] args) {
        
    String a,b;
    int n1,n2;
    
    a=JOptionPane.showInputDialog("Dame el valor de A");
    n1=Integer.parseInt(a);
    
    b=JOptionPane.showInputDialog("Dame el valor de B");
    n2=Integer.parseInt(b);
    
    if (n1>n2)JOptionPane.showMassage.Dialog(null,"B es mayor");
    
    }
}
compara_ay_b.java
Suscribirse a:
Comentarios de la entrada (Atom)

0 Tu opinion =D:
Publicar un comentario