Finding of the 4 larger (bigger) numbers from the list
like{1245,4587,2145,1163,29987,65783.....}
Answer / 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 |
is java purely oop Language?
49 Answers HCL, Infosys, TCS,
Write pseudo code for push in a stack?
What is a friend function & its advantage?
What is ambiguity in c++
Difference between realloc() and free?
what is the use of template classes in c++
What is virtual destructor? Why?
3 Answers Agile Software, College School Exams Tests, CSC,
Why interface is used?
What is difference between function overloading and overriding?
What is a friend function & its advantage?
What is Inheritance, Multiple Inheritance, Shared and Repeatable Inheritance?
features of OOPS
22 Answers Ness Technologies, Satyam,