Fairly new to C#. Have an assignment for class that asks us to generate an array from user inputted values. This part is done and work\'s perfectly.
Now that the arr
foreach (int item in array)
{
Console.Write(item.ToString() + " ");
int frequency = 0;
for (int i = 0; i < array.Length; ++i)
{
if (array[i] == item) ++frequency;
}
Console.WriteLine(frequency.ToString());
}
A dirty and brute force way. Considering your array is an "int" array. Otherwise, just change the types.