sort and reverse

 avatar
unknown
css
4 years ago
482 B
5
Indexable
double[] a = new double[5];
            int c = a.GetLength(0);
            for (int i = 0; i < c; i++)
            {
                a[i] = double.Parse(Console.ReadLine());
            }
            Array.Sort(a);
            Array.Reverse(a);

            Console.WriteLine("-----------------------------------------");
            for (int i = 0; i < c; i++)
            {
                Console.WriteLine(a[i]);
            }

                Console.ReadKey();
Editor is loading...