最近中文字幕高清中文字幕无,亚洲欧美高清一区二区三区,一本色道无码道dvd在线观看 ,一个人看的www免费高清中文字幕

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

各位學友老師幫忙看看怎么寫了不會用while循環(huán)寫了

各位學友老師幫忙看看怎么寫了不會用while循環(huán)寫了

ART原藝美學 2017-03-23 15:03:32
?用while 和for輸出1-1000之間被5整除的整數 且每行輸出3個int?count=0; ????????for(int?i=1;i<=1000;i++){ ????????????if(i%5==0){ ????????????????System.out.print(i+"\t"); ????????????????count++; ????????????} ????????????if(count==3){ ????????????????System.out.println(); ????????????????count=0; ????????????} ????????}while怎么寫了老寫不對
查看完整描述

3 回答

?
zzylove

TA貢獻9條經驗 獲得超1個贊

int?count=0;
int?i=1;
????????while(i<=1000){
????????????if(i%5==0){
????????????????System.out.print(i+"\t");
????????????????count++;
????????????}
????????????if(count==3){
????????????????System.out.println();
????????????????count=0;
????????????}
????????????i++;
????????}


查看完整回答
1 反對 回復 2017-03-24
?
__YXQ__

TA貢獻48條經驗 獲得超15個贊

int?i?=?1;
while(i<=1000){
????if(i%5==0){
????????System.out.print(i);
????????if(i/5%3==0){
????????????System.out.println();
????????}
????}
????i++;
}


查看完整回答
1 反對 回復 2017-03-24
?
等風來吧

TA貢獻1條經驗 獲得超1個贊

int i =1;

int count =0;

while(i <= 1000){

if(i %5==0){

System.out.print(i+" ");

count++;

}

i++

if(count%3==0){

System.out.println();

}

}



查看完整回答
1 反對 回復 2017-03-23
?
矛盾之問

TA貢獻1條經驗 獲得超0個贊

int?count?=?0;
int?i?=?1;
while(i<=1000){
????if(i%5==0){
????????System.out.print(i+"\t");
????????count++;
????}
????if(count==3){
???????System.out.println();
???????count=0;
?????}
i++;
}


查看完整回答
反對 回復 2017-03-24
?
yanrun

TA貢獻317條經驗 獲得超240個贊

什么問題啊,沒找到錯誤啊

查看完整回答
反對 回復 2017-03-23
  • 3 回答
  • 0 關注
  • 2220 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號