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

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

請求前輩告訴這哪里錯了???

請求前輩告訴這哪里錯了???

諸葛淺憶 2017-05-08 14:02:11
import java.util.Arrays;public class HelloWorld {? ??? ? //完成 main 方法? ? public static void main(String[] args) {? ? ? ? int[] scores={89,-23,64,91,119,52,73};? ? ? ? System.out.println("考試前三名的成績?yōu)椋?);? ? ? ? hellWord hello = new HelloWorld();? ? ? ? hello.showTop3(scores)? ? ? ? }? ? ? ??? ? public void showTop3(int[] scores){? ? ? ? Arrays.sort(scores);? ? ? ? int num = 0;? ? ? ? for(int i = scores.length-1 ; i >= 0 ; i--){? ? ? ? ? ? if(scores[i] <0 || scores[i] > 100){? ? ? ? ? ? ? ? continue;? ? ? ? ? ? }? ? ? ? ? ? num++;? ? ? ? ? ? if(num>3){? ? ? ? ? ? ? ? break;? ? ? ? ? ? }? ? ? ? ? ? System.out.println(scores[i]);? ? ? ? }? ? }}
查看完整描述

2 回答

已采納
?
yanrun

TA貢獻317條經(jīng)驗 獲得超240個贊

http://img1.sycdn.imooc.com//59100c3c000163bc04750319.jpg都在圖里了

查看完整回答
反對 回復 2017-05-08
  • 諸葛淺憶
    諸葛淺憶
    謝謝前輩
  • 諸葛淺憶
    諸葛淺憶
    import java.util.Arrays; public class HelloWorld { //完成 main 方法 public static void main(String[] args) { int[] scores={89,-23,64,91,119,52,73}; System.out.println("考試前三名的成績?yōu)椋?quot;); HelloWord hello = new HelloWorld(); hello.showTop3(scores); } public void showTop3(int[] scores){ Arrays.sort(scores); int num = 0; for(int i = scores.length-1 ; i >= 0 ; i--){ if(scores[i] <0 || scores[i] > 100){ continue; } num++; if(num>3){ break; } System.out.println(scores[i]); } } } //定義方法完成成績排序并輸出前三名的功能 為什么還會錯呢???前輩???
  • yanrun
    yanrun
    HelloWord hello = new HelloWorld();你又拼錯了
點擊展開后面2
?
回到原點co

TA貢獻2條經(jīng)驗 獲得超0個贊

?hello.showTop3(scores);以分號結(jié)尾

查看完整回答
反對 回復 2017-05-08
  • 2 回答
  • 0 關(guān)注
  • 1874 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

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

幫助反饋 APP下載

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

公眾號

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