using System;

namespace MyCompiler {
    class Program {
        public static void Main(string[] args) {
            //Console.WriteLine("Hello world!");
            int E = Convert.ToInt32(Console.ReadLine());
            string [] cadena = Console.ReadLine().Split(' ');
            int [] vector = new int[E];
            for (int i=0; i<vector.Length; i++) {
                vector[i] = Convert.ToInt32(cadena[i]);
            }
            int aux;
            for (int k=0; k < vector.Length - 1; k++) {
                for (int i=k+1; i < vector.Length; i++) {
                    if (vector[k] < vector[i]) {
                     aux=vector[i];
                        vector[i]=vector[k];
                        vector[k]=aux;
                    }
                }
            }
            Console.WriteLine("Los 3 mejores puntajes son: ");
            for (int i=0; i<3; i++) {
                Console.WriteLine(vector[i]);
            }
            Console.WriteLine("Los 3 peores puntajes son: ");
            for (int i=vector.Length-1 ; i > vector.Length - 4; i--) {
                Console.WriteLine(vector[i]);
            }
            
        }
    }
}

Embed on website

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