Random Number Generator(Max 20)
//HERES SOME TIPS BEFORE COPY AND PASTE:
//Press cntrl and A to copy everything.
//The numbers that are generated are Between 1 and 100.
//Check Brackeys c# 1st tutorial to Download visual studio code for this to work,else you will have to
//Make some changes to the NameSpace.
//Give credits in case of Video(GostGK).
//You are Free to edit and do changes to my code.
//If you find any problems,please contact me via email (kgiotakos@gmail.com)
//HERES THE CODE:
//------------------------------------------------
using System;
namespace My_Awesome_Program
{
class Program
{
static void Main(string[] args)
{
Console.Title = "Number Generator";
Console.ForegroundColor = ConsoleColor.Blue;
Console.WindowHeight = 40;
Console.WriteLine("Created By GostGK.CheckGostGK:");
Console.WriteLine("Instagram: @gostgkyt TikTok: @fortnitelegitgiveaways");
Console.WriteLine("This is a Number Generator.You can use it 40 times max.");
Console.WriteLine("The Numbers are Between 1 and 100.");
GeneratorNumber();
GeneratorNumber();
GeneratorNumber();
GeneratorNumber();
GeneratorNumber();
GeneratorNumber();
GeneratorNumber();
GeneratorNumber();
GeneratorNumber();
GeneratorNumber();
GeneratorNumber();
GeneratorNumber();
GeneratorNumber();
GeneratorNumber();
GeneratorNumber();
GeneratorNumber();
GeneratorNumber();
GeneratorNumber();
GeneratorNumber();
GeneratorNumber();
GeneratorNumber();
GeneratorNumber();
GeneratorNumber();
GeneratorNumber();
GeneratorNumber();
GeneratorNumber();
GeneratorNumber();
GeneratorNumber();
GeneratorNumber();
GeneratorNumber();
GeneratorNumber();
GeneratorNumber();
GeneratorNumber();
GeneratorNumber();
GeneratorNumber();
GeneratorNumber();
GeneratorNumber();
GeneratorNumber();
Console.WriteLine("Sorry,you can't use this Number Generator More!");
Console.WriteLine("Please,Restart The Program to use it Again!");
Console.WriteLine("Created By GostGK.CheckGostGK:");
Console.WriteLine("Instagram: @gostgkyt TikTok: @fortnitelegitgiveaways");
Console.ReadKey();
}
static void GeneratorNumber()
{
Random numberGenerator1 = new Random();
int numGen1 = numberGenerator1.Next(1, 100);
Random numberGenerator2 = new Random();
int numGen2 = numberGenerator2.Next(1, 100);
Random numberGenerator3 = new Random();
int numGen3 = numberGenerator3.Next(1, 100);
Random numberGenerator4 = new Random();
int numGen4 = numberGenerator4.Next(1, 100);
Random numberGenerator5 = new Random();
int numGen5 = numberGenerator5.Next(1, 100);
Random numberGenerator6 = new Random();
int numGen6 = numberGenerator6.Next(1, 100);
Random numberGenerator7 = new Random();
int numGen7 = numberGenerator7.Next(1, 100);
Random numberGenerator8 = new Random();
int numGen8 = numberGenerator8.Next(1, 100);
Random numberGenerator9 = new Random();
int numGen9 = numberGenerator9.Next(1, 100);
Random numberGenerator10 = new Random();
int numGen10 = numberGenerator10.Next(1, 100);
Random numberGenerator11 = new Random();
int numGen11 = numberGenerator11.Next(1, 100);
Random numberGenerator12 = new Random();
int numGen12 = numberGenerator12.Next(1, 100);
Random numberGenerator13 = new Random();
int numGen13 = numberGenerator13.Next(1, 100);
Random numberGenerator14 = new Random();
int numGen14 = numberGenerator14.Next(1, 100);
Random numberGenerator15 = new Random();
int numGen15 = numberGenerator15.Next(1, 100);
Random numberGenerator16 = new Random();
int numGen16 = numberGenerator16.Next(1, 100);
Random numberGenerator17 = new Random();
int numGen17 = numberGenerator17.Next(1, 100);
Random numberGenerator18 = new Random();
int numGen18 = numberGenerator18.Next(1, 100);
Random numberGenerator19 = new Random();
int numGen19 = numberGenerator19.Next(1, 100);
Random numberGenerator20 = new Random();
int numGen20 = numberGenerator20.Next(1, 100);
Console.WriteLine("Please say how many numbers you want to generate.(Max=20)");
int userNumCount = Convert.ToInt32(Console.ReadLine());
if (userNumCount == 1)
{
Console.WriteLine("Heres your number: " + numGen1);
}
else if (userNumCount == 2)
{
Console.WriteLine("Here are your numbers: " + numGen1 + " " + numGen2);
}
else if (userNumCount == 3)
{
Console.WriteLine("Here are your numbers: " + numGen1 + " " + numGen2 + " " + numGen3);
}
else if (userNumCount == 4)
{
Console.WriteLine("Here are your numbers: " + numGen1 + " " + numGen2 + " " + numGen3 + " " + numGen4);
}
else if (userNumCount == 5)
{
Console.WriteLine("Here are your numbers: " + numGen1 + " " + numGen2 + " " + numGen3 + " " + numGen4 + " " + numGen5);
}
else if (userNumCount == 6)
{
Console.WriteLine("Here are your numbers: " + numGen1 + " " + numGen2 + " " + numGen3 + " " + numGen4 + " " + numGen5 + " " + numGen6);
}
else if (userNumCount == 7)
{
Console.WriteLine("Here are your numbers: " + numGen1 + " " + numGen2 + " " + numGen3 + " " + numGen4 + " " + numGen5 + " " + numGen6 + " " + numGen7);
}
else if (userNumCount == 8)
{
Console.WriteLine("Here are your numbers: " + numGen1 + " " + numGen2 + " " + numGen3 + " " + numGen4 + " " + numGen5 + " " + numGen6 + " " + numGen7 + " " + numGen8);
}
else if (userNumCount == 9)
{
Console.WriteLine("Here are your numbers: " + numGen1 + " " + numGen2 + " " + numGen3 + " " + numGen4 + " " + numGen5 + " " + numGen6 + " " + numGen7 + " " + numGen8 + " " + numGen9 + " " + numGen10);
}
else if (userNumCount == 10)
{
Console.WriteLine("Here are your numbers: " + numGen1 + " " + numGen2 + " " + numGen3 + " " + numGen4 + " " + numGen5 + " " + numGen6 + " " + numGen7 + " " + numGen8 + " " + numGen9 + " " + numGen10 + " " + numGen11);
}
else if (userNumCount == 11)
{
Console.WriteLine("Here are your numbers: " + numGen1 + " " + numGen2 + " " + numGen3 + " " + numGen4 + " " + numGen5 + " " + numGen6 + " " + numGen7 + " " + numGen8 + " " + numGen9 + " " + numGen10 + " " + numGen11);
}
else if (userNumCount == 12)
{
Console.WriteLine("Here are your numbers: " + numGen1 + " " + numGen2 + " " + numGen3 + " " + numGen4 + " " + numGen5 + " " + numGen6 + " " + numGen7 + " " + numGen8 + " " + numGen9 + " " + numGen10 + " " + numGen11 + " " + numGen12);
}
else if (userNumCount == 13)
{
Console.WriteLine("Here are your numbers: " + numGen1 + " " + numGen2 + " " + numGen3 + " " + numGen4 + " " + numGen5 + " " + numGen6 + " " + numGen7 + " " + numGen8 + " " + numGen9 + " " + numGen10 + " " + numGen11 + " " + numGen12 + " " + numGen13);
}
else if (userNumCount == 14)
{
Console.WriteLine("Here are your numbers: " + numGen1 + " " + numGen2 + " " + numGen3 + " " + numGen4 + " " + numGen5 + " " + numGen6 + " " + numGen7 + " " + numGen8 + " " + numGen9 + " " + numGen10 + " " + numGen11 + " " + numGen12 + " " + numGen13 + " " + numGen14);
}
else if (userNumCount == 15)
{
Console.WriteLine("Here are your numbers: " + numGen1 + " " + numGen2 + " " + numGen3 + " " + numGen4 + " " + numGen5 + " " + numGen6 + " " + numGen7 + " " + numGen8 + " " + numGen9 + " " + numGen10 + " " + numGen11 + " " + numGen12 + " " + numGen13 + " " + numGen14 + " " + numGen15);
}
else if (userNumCount == 16)
{
Console.WriteLine("Here are your numbers: " + numGen1 + " " + numGen2 + " " + numGen3 + " " + numGen4 + " " + numGen5 + " " + numGen6 + " " + numGen7 + " " + numGen8 + " " + numGen9 + " " + numGen10 + " " + numGen11 + " " + numGen12 + " " + numGen13 + " " + numGen14 + " " + numGen15 + " " + numGen16);
}
else if (userNumCount == 17)
{
Console.WriteLine("Here are your numbers: " + numGen1 + " " + numGen2 + " " + numGen3 + " " + numGen4 + " " + numGen5 + " " + numGen6 + " " + numGen7 + " " + numGen8 + " " + numGen9 + " " + numGen10 + " " + numGen11 + " " + numGen12 + " " + numGen13 + " " + numGen14 + " " + numGen15 + " " + numGen16 + " " + numGen17);
}
else if (userNumCount == 18)
{
Console.WriteLine("Here are your numbers: " + numGen1 + " " + numGen2 + " " + numGen3 + " " + numGen4 + " " + numGen5 + " " + numGen6 + " " + numGen7 + " " + numGen8 + " " + numGen9 + " " + numGen10 + " " + numGen11 + " " + numGen12 + " " + numGen13 + " " + numGen14 + " " + numGen15 + " " + numGen16 + " " + numGen17 + " " + numGen18);
}
else if (userNumCount == 19)
{
Console.WriteLine("Here are your numbers: " + numGen1 + " " + numGen2 + " " + numGen3 + " " + numGen4 + " " + numGen5 + " " + numGen6 + " " + numGen7 + " " + numGen8 + " " + numGen9 + " " + numGen10 + " " + numGen11 + " " + numGen12 + " " + numGen13 + " " + numGen14 + " " + numGen15 + " " + numGen16 + " " + numGen17 + " " + numGen18 + " " + numGen19);
}
else if (userNumCount == 20)
{
Console.WriteLine("Here are your numbers: " + numGen1 + " " + numGen2 + " " + numGen3 + " " + numGen4 + " " + numGen5 + " " + numGen6 + " " + numGen7 + " " + numGen8 + " " + numGen9 + " " + numGen10 + " " + numGen11 + " " + numGen12 + " " + numGen13 + " " + numGen14 + " " + numGen15 + " " + numGen16 + " " + numGen17 + " " + numGen18 + " " + numGen19 + " " + numGen20);
}
else if (userNumCount == 0)
{
Console.WriteLine("You can't use 0.");
}
else
{
Console.WriteLine(userNumCount +" is Over 20.Maximum is 20.");
}
}
}
}
Σχόλια
Δημοσίευση σχολίου