+ 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.

8th Sep 2020, 9:46 AM
Joseph Oritseweyinmi
Joseph Oritseweyinmi - avatar
2 odpowiedzi
+ 1
Hint : Use for loop. Each iteration compare the values. Use index value.
8th Sep 2020, 9:50 AM
Vadivelan
0
using System.Linq; ... int maxValue = anArray.Max(); int maxIndex = anArray.ToList().IndexOf(maxValue);
8th Sep 2020, 11:44 AM
hossein B
hossein B - avatar