public static void scoreout(int[] s){
Arrays.sort(s);
System.out.println("考試成績(jī)前三名為:");
for(int i=s.length-1;i>=3;i--){
if(s[i]<0||s[i]>100){
continue;
}
System.out.println(s[i]);
}
}
Arrays.sort(s);
System.out.println("考試成績(jī)前三名為:");
for(int i=s.length-1;i>=3;i--){
if(s[i]<0||s[i]>100){
continue;
}
System.out.println(s[i]);
}
}
2014-11-10
private void getThreePointer(int[] ary){
Arrays.sort(ary);
for(int i = ary.length-1 ,j = 0; j != 3; i--){
if(ary[i]<0)
continue;
System.out.println(ary[i]);
j++;
}
}
有時(shí)候看一些廢物寫一長(zhǎng)串代碼真心搞笑
Arrays.sort(ary);
for(int i = ary.length-1 ,j = 0; j != 3; i--){
if(ary[i]<0)
continue;
System.out.println(ary[i]);
j++;
}
}
有時(shí)候看一些廢物寫一長(zhǎng)串代碼真心搞笑
2014-11-09