using System;
public class Program
{
public static void Main()
rand(1, 17);
}
public static void rand(int min, int max)
bool isopen = true;
int o = 0;
while(isopen)
{ Random a = new Random();
o++;
if(o == 1)
max = 17;
if(o == 2)
max = 2;
else if(o == 3)
max=21;
Console.WriteLine(o + " число: " + a.Next(min, max));
Console.WriteLine("продолжить?:");
String str = Console.ReadLine();
if(o == 3)
o = 0;
if(str == "нет".ToLower())
isopen = false;
else
isopen = true;
Console.Clear();