为了账号安全,请及时绑定邮箱和手机立即绑定

这个程序我使用的while 有问题么,我测试结果正确,跟其他人的不一样。。


public class HelloWord {

  public static void main(String[] ages){

 int score=53; 

 int count=0;

 System.out.println("加分前"+score);

 while(score<60){

 score++;

 count++;

 }System.out.println("加分后"+score+"加分次数"+count);

  }

}


正在回答

2 回答

 System.out.println("加分后成绩:"+score) 

System.out.println("共加了"+count+"次!");

分开写

0 回复 有任何疑惑可以回复我~
#1

lychge 提问者

非常感谢!
2015-08-07 回复 有任何疑惑可以回复我~

少个分号

0 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消

这个程序我使用的while 有问题么,我测试结果正确,跟其他人的不一样。。

我要回答 关注问题
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号