I must tell the console to print the number of times a value is repeated, in this case, it is the largest int, which would be the highest value of the vector, try a few things, but I am stuck, I will leave the code here .
If I can make you tell me which is the highest number, but I need you to tell me how many times the greater number or the int value is repeated.
I had one that was for when certain numbers were repeated, and I tried to edit it, but it did not work for me.
int[] numero = new int[10];
int i;
int mayor = -1;
int indice = 0;
Console.Clear();
Console.WriteLine("Ejercicio 1");
Console.WriteLine("");
Console.WriteLine("Leer 10 numeros enteros, almacenarlos en un vector y determinar el mayor");
Console.WriteLine("");
for (i = 0; i < numero.Length; i++)
{
Console.WriteLine("Digite un numero {0}", i);
int.TryParse(Console.ReadLine(), out numero[i]);
}
for (i = 0; i < numero.Length; i++)
{
Console.WriteLine(i + " - " + numero[i]);
}
for (i = 0; i < numero.Length; i++)
{
if (numero[i] > mayor)
{
mayor = numero[i];
indice = i;
}
}
Console.WriteLine("El mayor es {0} y su posicion es {1}", mayor, indice);
Console.ReadKey();