C#中怎么获取1到100的随机数?

来源:学生作业学帮网 编辑:学帮网 时间:2024/05/22 18:40:51

C#中怎么获取1到100的随机数?

Random randow = new Random(); Console.WriteLine(randow.Next(100)+1);