為什么只輸出一個(gè)值后面的沒(méi)輸出
public class HelloWorld {
? ? public static void main(String[] args) {
? ? ? ? int score = 53;?
? ? ? ? int count = 0;
? ? ? ? System.out.println("加分前的成績(jī)"+ score);
? ? ? ? while(score<60);{
? ? ? ? ? ? score++;
? ? ? ? ? ? count++;
? ? ? ? }
? ? ? ? System.out.println("加分后的成績(jī)"+ score);
? ? ? ? System.out.println("共加了"+count+"次!");
? ? ? ??
? ? }
}
2015-03-04
while(score<60);{ ?這里多了一個(gè)分號(hào)
2015-03-04
將?while(score<60)?后面的分號(hào)去掉就行了