if else 154
import javax.swing.JOptionPane;
public class display3_1
{
public static void main(String[] args)
{
String theNumber=JOptionPane.showInputDialog("Enter the number ");
int number=Integer.parseInt(theNumber);
if(number <>
System.out.println(number+"is less than zero.");
else if (number <>
System.out.println(number+"is between 0 and 99(inclusuve).");
else
System.out.println(number+"is 100 or large.");
System.exit(0);
}
}
0 Comments:
張貼留言
<< Home