錯誤在哪兒咧?
public?class?HelloWorld?{
????public?static?void?main(String[]?args)?{
????????int?score?=?53;?
????????int?count?=?0;
????????System.out.println('加分前成績:'?+?score);
????????while(score?<?60){
????????????score?=?score?+?1;
????????????count?=?count?+?1;
????????}
????????System.out.println('加分后成績:'?+?score);
????????System.out.println('共加了'?+?count?+?'次!');
????????
????}
}錯誤在哪兒咧?
2016-07-12
System.out.println('加分前成績:'?+?score) 里面的單引號應該改成雙引號 在編程的時候 打單引號的話應該代碼下面就會有紅色波浪線報錯的
2016-07-12
System.out.println('加分前成績:'?+?score);需用雙引號,如System.out.println("加分前成績:" +?score);
2016-07-12
println里面的字符串要使用雙引號
2016-07-12
雙引號
2016-07-12
println里面的字符串要使用雙引號;