第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定

正在回答

4 回答

import?java.util.Arrays;
public?class?HelloWorld?{
????public?static?void?main(String[]?args)?{
????????int[]?scores?=?{9?,?-23?,?64?,?91?,?119?,?52?,?73};
????????System.out.println("前三名成績(jī)?yōu)椋?);
????????HelloWorld?hello?=?new?HelloWorld();
????????hello.topthree(scores);
????}
????public?void?topthree(int[]?scores){
????????Arrays.sort(scores);
????????int?count?=?0;
????????for(int?i?=?scores.length?-?1;?i?>=?0;?i--)?{
????????????if(scores[i]?>?100?||?scores[i]?<?0)?{
????????????????continue;
????????????}?//這里要加個(gè)括號(hào),不然后面的代碼都是這個(gè)if語(yǔ)句里的,邏輯上就不正確了
????????????count++;
????????????System.out.println(scores[i]);
????????????if(count?>=?3)
????????????????break;
????????}
????}
}?//?這里少了一個(gè)括號(hào)

把你上面的代碼修改了一下,參考一下吧

0 回復(fù) 有任何疑惑可以回復(fù)我~

https://img1.sycdn.imooc.com//5bfbc0e000011dd113350775.jpg還是不對(duì)。。

0 回復(fù) 有任何疑惑可以回復(fù)我~

https://img1.sycdn.imooc.com//5bfb57450001aff005340471.jpg

由于你沒有貼出你的代碼,我給不好糾錯(cuò),給你我的答案參考一下

0 回復(fù) 有任何疑惑可以回復(fù)我~

https://img1.sycdn.imooc.com//5bfad5530001685407060498.jpg

可以參考一下我的

0 回復(fù) 有任何疑惑可以回復(fù)我~

舉報(bào)

0/150
提交
取消

8-1編程練習(xí)

我要回答 關(guān)注問題
微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)