public static void Main()
int[] vector, valores, frecuencias;
Console.WriteLine("ingrese el tamaño maximo del vector");
maximo = int.Parse(Console.ReadLine());
vector = new int [ maximo ];
valores = new int [ maximo ];
frecuencias = new int [ maximo ];
vector = llenar_vector( maximo );
valores = llenar_posiciones( vector );
frecuencias = actualizar_frecuencia( vector, valores );
Console.WriteLine("Vector original");
for ( i=0; i < vector.Length ; i++){
Console.Write("[{1}]", i, vector[i]);
Console.WriteLine("\nVector de valores");
for ( i=0; i < vector.Length ; i++){
Console.Write("[{1}]", i, valores[i]);
Console.WriteLine("\nVector frecuencias");
for ( i=0; i < vector.Length ; i++){
Console.Write("[{1}]", i, frecuencias[i]);
Console.WriteLine( "\nEjecutado el : " + DateTime.Today );
private static int[] llenar_vector( int maximo ){
int[] vector = new int[maximo];
for ( ; i < maximo; i++){
Console.WriteLine("ingrese un elemento en la posicion [{0}]", i+1);
vector[i] = int.Parse(Console.ReadLine());
private static int[] llenar_posiciones( int[] x ){
int [] valores = new int[x.Length];
for ( i=0; i < x.Length; i++){
for( j=0; j < valores.Length; j++){
if ( x[i] == valores[j]){
private static int[] actualizar_frecuencia( int[] vector, int[] valores ){
int[] frecuencias = new int[vector.Length];
for ( ; i < vector.Length; i++){
for( j=0; j < vector.Length; j++){
if ( valores[i] == vector[j]){