Skip to content

Instantly share code, notes, and snippets.

@sanrodari
Created March 23, 2012 18:47
Show Gist options
  • Save sanrodari/2173710 to your computer and use it in GitHub Desktop.
Save sanrodari/2173710 to your computer and use it in GitHub Desktop.
Ejercicio Diego
public class Operacion3 {
public static void main(String[] args)
{
int calc = Integer.parseInt(JOptionPane.showInputDialog("ingrese numero"));
if (calc < 0 )
{
JOptionPane.showMessageDialog(null, "el numero es; negativo");
}
else if (calc > 0 )
{
JOptionPane.showMessageDialog(null, "el numero es positivo");
}
else if (calc == 0 )
{
JOptionPane.showMessageDialog(null, "el numero es 0");
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment