using System;

namespace MyCompiler {
    class Program {
        public static void Main(string[] args) {
            Random r = new Random();
            int acum = 0;
            double Prom;
            
            int N = Convert.ToInt32(Console.ReadLine());
            string [] cadena = Console.ReadLine().Split(' ');
            int [] ID = new int[cadena.Length];
            int [] NUMCORREC = new int[cadena.Length];
            int [] NUMINCOR = new int[cadena.Length];
            int [] RESULTADO = new int[N];
            
            
            
            for (int i=0; i < cadena.Length; i++) {
            	ID[i] = Convert.ToInt32(cadena[i]);
            	NUMCORREC[i] = (r.Next(50, 101));
            	NUMINCOR[i] = 100 - NUMCORREC[i];
            	RESULTADO[i] = NUMCORREC[i] * 50 - NUMINCOR[i] * 30;
            	acum += RESULTADO[i];
            }
            
            Prom = acum / N;
            for (int i= 0; i < RESULTADO.Length; i++) {
                Console.WriteLine("ID   CORRECTAS   INCORRECTAS   RESULTADO");
                Console.WriteLine($"{ID[i]}       {NUMCORREC[i]}         {NUMINCOR[i]}           {RESULTADO[i]}");
            }
            
            int mayor=NUMCORREC[0], pos1=0;
            int menor=RESULTADO[0], pos2=0;
            for (int i=1; i < RESULTADO.Length; i++) {
                //Mayor
                if (NUMCORREC[i] >= mayor) {
                    mayor = NUMCORREC[i];
                    pos1 = i;
                }
                //Menor
                if (RESULTADO[i] <= menor) {
                    menor = RESULTADO[i];
                    pos2 = i;
                } 
                
            }
            Console.WriteLine($"Numero mayor de respuestas correctas es : {mayor} y su posicion es : {pos1+1}");
            Console.WriteLine($"Numero menor de resultados es : {menor} y su posicion es : {pos2+1}");
            Console.WriteLine($"Total acomulado de los resultados es: {acum}");
            Console.WriteLine($"El resultado promedio de la competencia es: {Prom:F2}");

       } 
    }
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: