📅  最后修改于: 2022-03-11 14:49:14.034000             🧑  作者: Mango
Random numberGen = new Random();
int amountToOutput = 4;
int minimumRange = 1;
int maximumRange = 20;
for(int i = 0; i < amountToOutput; i++)
{
int randomNumber = numberGen.Next(minimumRange, maximumRange);
Console.WriteLine(randomNumber);
}