求教 這樣做的錯誤在哪里 求指教 謝謝!
public class HelloWorld {
? ? public static void main(String[] args) {
? ? ? ??
? ? ? ? // 變量保存成績
? ? ? ? int score = 53;?
? ? ? ??
? ? ? ? // 變量保存加分次數(shù)
? ? ? ? int count = 0;
? ? ? ? //打印輸出加分前成績?
? ? ? ? System.out.println("加分前成績"+score);
? ? ? ?
? ? ? ??
? ? ? ? // 只要成績小于60,就循環(huán)執(zhí)行加分操作,并統(tǒng)計加分次數(shù)
? ? ? ??
? ? ? ? while(score < 60);{
? ? ? ? ? ? score+=1;
? ? ? ? ? ? count++;
? ? ? ??
? ? ? ??
? ? ? ??
? ? ? ??
? ? ? ??
? ? ? ? //打印輸出加分后成績,以及加分次數(shù)
? ? ? System.out.println("加分后成績"+score);
? ? ? System.out.println("共加" ?+count+ "次");
? ? }
}
2016-12-19
while(score<60){score++;count++;}
2016-12-05
while后面多了個;號
2016-11-26
少一個大括號
2016-11-26
while循環(huán)條件括號外多了一個;
2016-11-26
while 循環(huán)少了一個大括號