最新回答 / 一口一瓶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
最新回答 / 秋野4385331
public class HelloWorld{public static void main(String[] args){????????int num = 999;????????int count = 0;? ????? while(num>0){? ? ? ????? num/=10;? ? ? ? ????count++;? ????? }????????System.out.println("它是個"+count+"位的數!");????}}
2024-05-18
最新回答 / weixin_慕容2563018
你的sum寫在for的括號里的話,當for下面的代碼塊結束以后,sum就會被清除,System.out.println("1到100之間不能被3整除的數之和為:"+sum)中就找不到sum了。如果不知道是為什么的話,可以去看看作用域
2024-05-10