I am trying to set up a a program that gets four numbers from the user, also a random generator to get four numbers compare if any were the same and print out how many numbers were matching this is what I have so far...
using System;
class Program
{
static void Main(string[] args)
{
Console.Title = "Simple RNG";
int ran1;
int ran2;
int ran3;
int ran4;
Console.WriteLine("Please enter first random numberfrom 1 - 10");
ran1 = Convert.ToInt32(Console.ReadLine());
Console.WriteLine("Please enter second random numberfrom 1 - 10");
ran2 = Convert.ToInt32(Console.ReadLine());
Console.WriteLine("Please enter third random numberfrom 1 - 10");
ran3 = Convert.ToInt32(Console.ReadLine());
Console.WriteLine("Please enter fourth random numberfrom 1 - 10");
ran4 = Convert.ToInt32(Console.ReadLine());
Random randomNum = new Random();
int myRandom1;
int myRandom2;
int myRandom3;
int myRandom4;
myRandom1 = randomNum.Next(1, 10);
myRandom2 = randomNum.Next(1, 10);
myRandom3 = randomNum.Next(1, 10);
myRandom4 = randomNum.Next(1, 10);
Console.WriteLine("\n\nYour random numbers are: {0} {1} {2} {3}", myRandom1, myRandom2, myRandom3, myRandom4);
Console.WriteLine("The four numbers you entered are: {0} {1} {2} {3}" , ran1, ran2, ran3, ran4);
}
}