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

為了賬號安全,請及時綁定郵箱和手機立即綁定

error: not a statement scores[i]>scores[j]; ^ 1 error

這是哪里出錯了呢,求大神指教


正在回答

3 回答

針對你的修改如下,你看看,
public?class?HelloWorld?{???
????//完成?main?方法
????public?static?void?main(String[]?args)?{
????????int?[]scores={89,-23,64,91,119,52,73};?????
????????System.out.print("考試成績的前三名為:");
????????get(scores);???
????}
????
????//定義方法完成成績排序并輸出前三名的功能
????public?static?void?get(int?scores[]){
????????int?c;??????
????????for(int?i=0;i<scores.length-1;i++){?????
????????????for(int?j=i+1;j<scores.length;j++){
????????????????if(scores[i]<scores[j]){??//作為條件語句放在if里面
????????????????c=scores[i];
????????????????scores[i]=scores[j];
????????????????scores[j]=c;
????????????????}??????????
????????}
????????}
????????System.out.print(scores[0]+"?");
????????System.out.print(scores[1]+"?");
????????System.out.print(scores[2]);?
????}????
}


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

chen7841835 提問者

非常感謝!
2015-03-26 回復(fù) 有任何疑惑可以回復(fù)我~

這是怎么說呢?


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

scores[i]>scores[j]不是一個完整的語句,可以放在if語句里面。


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

chen7841835 提問者

這是怎么說呢
2015-03-26 回復(fù) 有任何疑惑可以回復(fù)我~

舉報

0/150
提交
取消

error: not a statement scores[i]>scores[j]; ^ 1 error

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

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

幫助反饋 APP下載

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

公眾號

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