首页 > 其他 > 详细

My First Code in cnblogs.

时间:2017-01-05 22:30:34      阅读:183      评论:0      收藏:0      [点我收藏+]

 1 import java.util.Arrays;
 2 public class Exercise_L8 {
 3     public static void main(String[] args) {
 4         Exercise_L8 HELLO = new Exercise_L8();
 5         int[] scores = {89,-23,64,91,119,52,73};
 6         System.out.println("First 3 Mark is:");
 7         HELLO.printScore(scores);
 8     }
 9     public void printScore(int[] scores){
10         int count = 0;
11         int i = 0;
12         Arrays.sort(scores);
13         while (count < 3) {
14             if (scores[i]<=100 && scores[i]>=0)
15             {
16                 System.out.println(scores[i]);
17                 count++;
18             }
19             i++;
20         }
21     }
22 }

My First Code in cnblogs.

原文:http://www.cnblogs.com/superherocheng/p/6254176.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!