Last active
March 4, 2018 01:17
-
-
Save BalicantaYao/d9916961c9d973bb39c0e27c3fddfff3 to your computer and use it in GitHub Desktop.
20180225 Java Homework
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1.(數列反印) 亂數產生10個介於2~2000的偶數,依序存到陣列內,再反印之, | |
輸出範例 | |
原始數列: 250 1400 890 126 1844 734 182 1922 36 976 | |
反印數列: 976 36 1922 182 734 1844 126 890 1400 250 | |
2.(數列和) 亂數產生10個整數,值介於1-99之間,求10個整數和. | |
3.請寫一個 Method, 接收最大亂數值、最小亂數值產生一個落在範圍裡的亂數,並印出 | |
public void printRandom(int max, int min){ | |
} | |
進階題 | |
4.(丟棄重複的數,duplicate elimination)資料結構新增資料時,不存重複資料的現象. | |
請寫程式產生20個介於1~50之間的亂數,將所有不重複的數存於陣列. | |
5.(最接近的數)用亂數產生10個整數,介於0~100之間,找出其中兩個最接近的數. |
please help to check the code as below, I can't find the error.
https://gist.github.com/JasonSupper/609861e40adcddfd8e43a13b00395daa
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://gist.github.com/claire1220/099a72641264ad4058d696f4d770c79a