输出100个【10,99】区间上的随机整数

来源:互联网 发布:如何网络写小说 编辑:程序博客网 时间:2024/05/07 20:26
using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace ConsoleApplication1{    class Program    {        static void Main(string[] args)        {            Random rd = new Random();            for (int i = 1; i <= 100; i++)            {                if (i % 7 == 0)                {                    Console.WriteLine(rd.Next(10, 100));                                    }                else                {                    Console.Write("{0}",rd.Next(10,100));                }        }            Console.ReadLine();        }    }}

0 0
原创粉丝点击