if怎么實(shí)現(xiàn)不同條件輸出
public class HelloWorld {
? ? public static void main(String[] args) {
int one = ?388;
? ?if(one>100);
? ?System.out.println("合格");
??
? ?if(one>360);
? ?System.out.println("優(yōu)秀");
怎么寫(xiě)啊,小白
public class HelloWorld {
? ? public static void main(String[] args) {
int one = ?388;
? ?if(one>100);
? ?System.out.println("合格");
??
? ?if(one>360);
? ?System.out.println("優(yōu)秀");
怎么寫(xiě)啊,小白
舉報(bào)
2017-12-27
public class HelloWorld {
? ? public static void main(String[] args) {
int one = ?388;
? ?if(one>100&&one<360);
? ?System.out.println("合格");
??
? ?if(one>360);
? ?System.out.println("優(yōu)秀");
2017-11-23
public class HelloWorld {
public static void main(String[] args) {
int one=388;
????????????if(one>360){
????????????System.out.println("優(yōu)秀");
????????????}else if(one>100){
????????????System.out.println("合格");
????????}
????}
}
應(yīng)該是這樣吧。。。錯(cuò)了別打我。。。我也剛學(xué)