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

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問題,去搜搜看,總會(huì)有你想問的

求大神查錯(cuò)

求大神查錯(cuò)

慕少4018567 2016-01-27 16:23:07
package one;import java.util.Arrays;public class one {??? ??? //完成 main 方法??? public static void main(String[] args) {??????? ?????? one hello=new one();?????? ??????? int[] scores={89 , -23 , 64 , 91 , 119 , 52 , 73};??????? ??????? int[] three=hello.change(scores);???????????????????????????????????????????????? //wrong??????????????? System.out.println(three);??????? ??? }??? ??? //定義方法完成成績(jī)排序并輸出前三名的功能??? public? int change(int[] scores){??????? ??????? Arrays.sort(scores);??????? ??????? int[] one=new int[3];??????? ??????? for(int i = 0 ; i < 3 ; i++){??????????? ??????????? if(scores[i] > 0 && scores[i] < 100){??????????? ??????????? int m=0;??????????? ?????????????? one[m]=scores[i];??????????????? ??????????????? m++;??????????? }??????? ??????? return one;??????????????????????????????????????????????????????????????????????????????? ?//wrong??????? ??????? }??? }??????? }
查看完整描述

1 回答

已采納
?
慕萊塢9220042

TA貢獻(xiàn)377條經(jīng)驗(yàn) 獲得超508個(gè)贊

你好,

package?one;

import?java.util.Arrays;

public?class?one?{
????
????//完成?main?方法
????public?static?void?main(String[]?args)?{
????????
???????one?hello=new?one();
???????
????????int[]?scores={89?,?-23?,?64?,?91?,?119?,?52?,?73};
????????
????????int[]?three=hello.change(scores);?????????????????????????????????????????????????//wrong
????????for?(int?i?=?0;?i?<?three.length;?i++)?{
????????	System.out.println(three[i]+",");
		}
????????System.out.println(three);????????
????}
????
????//定義方法完成成績(jī)排序并輸出前三名的功能
????public??int[]?change(int[]?scores){
????????
????????Arrays.sort(scores);
????????
????????int[]?one=new?int[3];
????????
????????for(int?i?=?0?;?i?<?3?;?i++){
????????????
????????????if(scores[i]?>?0?&&?scores[i]?<?100){
????????????
????????????int?m=0;
????????????
???????????????one[m]=scores[i];
????????????????
????????????????m++;
????????????}
????????
????????}
????????return?one;????????????????????????????????????????????????????????????????????????//wrong
????}
????????
}

試下這個(gè),可以正常運(yùn)行,具體輸出好像有問題,自己查下代碼看下哪里不對(duì);

望樓主采納!

查看完整回答
反對(duì) 回復(fù) 2016-01-28
  • 1 回答
  • 0 關(guān)注
  • 1218 瀏覽
慕課專欄
更多

添加回答

舉報(bào)

0/150
提交
取消
微信客服

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

幫助反饋 APP下載

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

公眾號(hào)

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