You are on page 1of 1

public static void main( String args[] )

{
String strNumero1;
String strNumero2;
int intNumero1;
int intNumero2;
int suma;
strNumero1 = JOptionPane.showInputDialog(
1" );
strNumero2 = JOptionPane.showInputDialog(
2" );
intNumero1 = Integer.parseInt( strNumero1
intNumero2 = Integer.parseInt( strNumero2

"Ingrese el entero
"Ingrese el entero
);
);

suma = intNumero1 + intNumero2;


JOptionPane.showMessageDialog(
null, "La suma es " + suma, "Resultado,",
JOptionPane.PLAIN_MESSAGE );
System.exit( 0 );
}

You might also like