directory structure change, organize by class number as opposed to mod number
Signed-off-by: Amrit Panesar <apanesar@4195tech.com>
This commit is contained in:
1 parent
2a3d6fc042
commit
8683384387
480 files changed
+7
No files matched your search
@@ -0,0 +1,37 @@
|
||||
import javax.swing.*;
|
||||
|
||||
public class PosNegZed
|
||||
{
|
||||
public static void main(String[] args) //main
|
||||
{
|
||||
String input = JOptionPane.showInputDialog("Please enter a whole number.");
|
||||
int iInt01 = 0;
|
||||
try
|
||||
{
|
||||
iInt01 = Integer.parseInt(input);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
JOptionPane.showMessageDialog(null, "We're sorry, \""+input+"\" was"
|
||||
+ " an incorrect input.", "Error", JOptionPane.ERROR_MESSAGE);
|
||||
System.exit(0);
|
||||
}
|
||||
if (iInt01 > 0)
|
||||
{
|
||||
JOptionPane.showMessageDialog(null, "\""+input+"\" is positive.",
|
||||
"Thank You", JOptionPane.INFORMATION_MESSAGE);
|
||||
}
|
||||
else if (iInt01 < 0)
|
||||
{
|
||||
JOptionPane.showMessageDialog(null, "\""+input+"\" is negative.",
|
||||
"Thank You", JOptionPane.INFORMATION_MESSAGE);
|
||||
}
|
||||
else if (iInt01 == 0)
|
||||
{
|
||||
JOptionPane.showMessageDialog(null, "\""+input+"\" is zero.",
|
||||
"Thank You", JOptionPane.INFORMATION_MESSAGE);
|
||||
}
|
||||
System.exit(0);
|
||||
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user