AI智能
改变未来

C#学习.生成随机数

            const int N = 50;
            long[] a = new long
;

            var r = new Random();
            for (int i = 0; i < N; i++)
            {
                a[i] = r.Next(1, 10);
                Console.WriteLine(\”a[{0}]是{1}\”, i, a[i]);
            }

赞(0) 打赏
未经允许不得转载:爱站程序员基地 » C#学习.生成随机数