using System;

namespace MyCompiler {
    class Program {
        public static void Main(string[] args) {
            int N = Convert.ToInt32(Console.ReadLine());
            string [] cadena = Console.ReadLine().Split(' ');
            int [] pasajeros = new int[N];
            int totalpas=0, totalpasmit=0;
            double promedio;
            for (int i=0; i<pasajeros.Length; i++) {
            	pasajeros[i] = Convert.ToInt32(cadena[i]);
            	totalpas += pasajeros[i];
            }
            Console.WriteLine($"El total de pasajeros de la empresa Avianca es: {totalpas}");
            for (int i=0; i<pasajeros.Length/2; i++) {
                totalpasmit += pasajeros[i];
            }
            promedio = totalpasmit/(N/2);
            Console.WriteLine($"El promedio de pasajeros de la mitad es: {promedio}");
            int menor=pasajeros[0], pos=1;
            for (int i=0; i<pasajeros.Length; i++) {
            	if(pasajeros[i] < menor){
            	    menor=pasajeros[i];
            	    pos=i+1;
            	}
            }
            Console.WriteLine($"El menor numero de pasajeros es: {menor} y esta en el avion numero {pos}");
        }
    }
}

Embed on website

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