You are on page 1of 2

using System;

using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ejerciciodevectores
{
class Program
{
static void Main(string[] args)

{
int valor=0;
int n;
int mayor = 0;

Console.WriteLine("INGRESE UN NUMERO");
n = int.Parse(Console.ReadLine());
int[] vector = new int[n];
for (int i = 0; i < n; i++)
{
Console.WriteLine("INGRESE UN VALOR:+" + i);
valor = int.Parse(Console.ReadLine());
vector[i] = valor;
}

{
if (mayor >= valor)
{
valor = mayor;

}
Console.WriteLine("el mayor de los numeros es: "+valor);
}

for (int i = 0; i < n; i++)


{
Console.WriteLine("el valor que mas se repite es:" + valor + "un
total de" + mayor + "veces");

Console.ReadKey();
}
}
}
}

You might also like