Finding of the 4 larger (bigger) numbers from the list
like{1245,4587,2145,1163,29987,65783.....}
Answer Posted / santhosh
int Max = 4;
List<int> lst = new List<int>(new int[] { 1, 12,
2, 11, 15, 3, 14, 4, 5, 6, 7, 8, 9, 10 });
lst.Sort();
if (Max <= lst.Count)
Console.WriteLine(string.Format("The {0} th
Maximum value is {1}.", Max, lst[lst.Count - Max]));
else
Console.WriteLine(string.Format("This list
contain less items. So you could not find the {0}th highest
value from the list.", Max));
| Is This Answer Correct ? | 1 Yes | 1 No |
Post New Answer View All Answers
Write a program to reverse a string using recursive function?
What is for loop and its syntax?
What is purpose of inheritance?
Who invented oop?
What is debug class?what is trace class? What differences are between them? With examples.
What language is oop?
How is class defined?
What are the important components of cohesion?
What does and I oop mean?
What is variable example?
Is this job good for future? can do this job post grduate student?
What do you mean by abstraction?
What is abstraction in oop with example?
Templates mean
What is polymorphism oop?