求大神解答
public class Java5_1 {
public static void main(String[] args){
int score=53;
System.out.println("加分前成績為"+score);
int count=0;
for (score=53;score<60;score++){count++;
}System.out.println("加分后成績為"+score);//score加分后成績怎么為60了????我設定的條件是<60?。繎撌?9才對呀
System.out.println("加分次數為"+count);
}
}
2015-03-15
因為分數達到59時還滿足條件繼續執行代碼,直到60才不符合條件退出循環,所以是60