0
這是我當前的代碼生成一組20個隨機數字:找到最大的號碼和其隨機數組中的索引
int[] array_1 = new int[20];
Random rand = new Random();
for (int i = 0; i < array_1.Length; i++)
{
array_1[i] = rand.Next(10,100);
Console.Write("{0} ", array_1[i]);
}
我寫了相同的代碼,但我忘了,包括數組指數。所以我剛剛刪除了我的答案,並給了你一個贊成票。 :) – BrettFromLA 2014-10-16 18:54:08
最小的數字是多少? – user3290428 2014-10-16 19:13:54
在if條件中將>更改爲< – 2014-10-16 19:31:10