Lab If-Else (2)
public static void main(String[] args)
{
int n;
String fishString=JOptionPane.showInputDialog(" please enter a number: ");
n = Integer.parseInt(fishString);
if(n<0){ n= " +n+ ">=0 & n<100){ n= " +n+ ">=100 )
{
System.out.println("n>=100,n= " +n+ " , ");
}
System.exit(0);
}
}
圖檔
0 Comments:
Post a Comment
<< Home