I'm having trouble getting accurate results on my code to get the mode. it is based on the users input. can anyone help please? this is the code I'm working on for days
string[] ArrModeInput = new string[20];
//USER INPUT
Console.WriteLine("Please Enter 20 Numbers ");
//TO INPUT
for (int stats = 0; stats < ArrModeInput.Length; stats++)
{
ArrModeInput[stats] = Console.ReadLine();
}
//CONDITION
for (int stats = 0; stats < ArrModeInput.Length; stats++)
{
//ArrModeInput[stats] = Console.ReadLine();
int Count = 0;
for (int m = 0; m < ArrModeInput.Length; m++)
if (ArrModeInput[stats] == ArrModeInput[m])
Count = Count + 1;
Console.WriteLine("\t\n Mode is " + ArrModeInput[stats] + ". It ocuurs " + Count + " times");
}