public int FindlargestNumber(int[] iarray) { int maxvalue = 0; for (int i = 0; i <= iarray.Length - 1; i++) { if (iarray[i] > maxvalue) { maxvalue = iarray[i]; } if (maxvalue % 2 == 0) { } } return maxvalue; }
This will return only one max value how would I implement the same to get top n values??
Regards
Sangeetha