I'm writing a program that could store 100 customer ID in an array.
Using foreach loop to check, If same ID exist more than 3 times, it will prompt for error.
Can anyone please help me with this, thanks;
int[] Cid = new int[5];
for (int i = 0; i < 100; i++)
{
Console.Write("Customer ID: ");
Cid[i] = int.Parse(Console.ReadLine());
foreach(int d in Cid)
{
if (??? Cid in array more than 3 times ???)
Console.WriteLine("YOU HAVE EXCEEDED NUMBER OF ID");
}
}