63 074
Assignments Done
99,1%
Successfully Done
In July 2018

Answer to Question #20141 in C# for kumar saurav

Question #20141
write a program to display the highest 10 number entered.
Expert's answer
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApplication1
{
class Program
{
& static void Main(string[] args)
& {
List<int> ar = new List<int>();
Console.WriteLine("Enter array length:");
int len = int.Parse(Console.ReadLine());
for (int i = 0; i < len; i++)
{
ar.Add(int.Parse(Console.ReadLine()));
}
ar.Sort();
for (int i = 0; i < 10 && i < len; i++)
{
Console.WriteLine(ar[i]);
}
& }
}
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be first!

Leave a comment

Ask Your question

Submit
Privacy policy Terms and Conditions