diff --git a/_config.yml b/_config.yml new file mode 100644 index 0000000..cc35c1d --- /dev/null +++ b/_config.yml @@ -0,0 +1 @@ +theme: jekyll-theme-modernist \ No newline at end of file diff --git a/roulette/Program.vb b/roulette/Program.vb index 235b87e..6759e66 100644 --- a/roulette/Program.vb +++ b/roulette/Program.vb @@ -395,6 +395,25 @@ Module Program Console.ReadKey() End Sub + Sub TestGenerator() + Randomize() + Dim Count, Ending As Integer + Dim rnd As New Random + Console.Write("Введите количество чисел для генерирования >>> ") + Count = Console.ReadLine() + Console.Write("Введите конец диапазона проверки (от 0 по X, где X - число, которое вводится сейчас) >>> ") + Ending = Console.ReadLine() + Dim mass(Count) As Integer + For i = 0 to Ubound(mass) + mass(i) = 0 + Next + Dim now As Integer + For i = 0 To Count + mass(rnd.Next(0, Ending)) += 1 + Next + + End Sub + Sub Main() Console.BackgroundColor = ConsoleColor.Green Console.ForegroundColor = ConsoleColor.DarkBlue @@ -405,6 +424,8 @@ Module Program Console.WriteLine("1) Начать игру") Console.WriteLine("2) Ознакомиться с правилами") Console.WriteLine("3) О игре") + Console.WriteLine("Дополнительно:") + Console.WriteLine("4) Проверка генератора случайных чисел") Console.WriteLine("0) Выйти из игры") Console.Write(">>> ") Dim input As Integer = Console.ReadLine @@ -421,6 +442,8 @@ Module Program Case 3 About() Main() + Case 4 + TestGenerator() End Select End Sub End Module