最新回答 / AI小慕
關(guān)于你的問題“為什么條件不能為=”,這可能是因為你在編程中遇到了一些特定的語法或邏輯錯誤。在大多數(shù)編程語言中,=?是賦值操作符,而?==?是比較操作符。如果你試圖在條件判斷中使用...
2024-11-11
最新回答 / 慕仙4356622
System.out.println("變量hobby的內(nèi)容是:"+hobby); //最后這一句的后個雙引號是中文的,所以報錯。上面的是改正過的
2024-10-16
最新回答 / 一口一瓶AD鈣
public class HelloWorld {? ? public static void main(String[] args) {? ? ? ? int score = 94;? ? ? ? String sex = "女";? ? ? ? if(score>80){? ? ? ? ? ? System.out.println("進入決賽");? ? ? ? ? ? if(sex.equals ("女")){? ? ? ? ? ? ? ? System.out.println("進入女子決賽...
2024-08-08
for(int i = 10;;) {
count += 1;
if(i>num){
break;
}else {
i *= 10;
}
}
System.out.println("他是個" + count + "位的數(shù)");
偷雞用了條件判斷沒用嵌套循環(huán)。
count += 1;
if(i>num){
break;
}else {
i *= 10;
}
}
System.out.println("他是個" + count + "位的數(shù)");
偷雞用了條件判斷沒用嵌套循環(huán)。
2024-05-16