+ 1
How to i find the largest number of a group of numbers
I want find the largest number of a group of numbers but i don't want use any pre defined methods.
2 Answers
+ 1
Hint :
Use for loop.
Each iteration compare the values.
Use index value.
0
using System.Linq;
...
int maxValue = anArray.Max();
int maxIndex = anArray.ToList().IndexOf(maxValue);