Answers for "find a largest number in c#"

C#
9

find largest number in array c#

int biggest = list[0];//list refer to your list's name
for(int i = 1;i < list.Count;++i)
{
	if(list[i] > biggest)
    {
     	biggest = list[i]; 
    }
}
//now biggest will be the biggest number of the list
Posted by: Guest on March-05-2021
0

how to find the biggest number in c#

public double FindBiggest(List<double> numbers)
{
	int biggest = numbers[0];
  	for (int i = 1; i < numbers.Count; i++)
    {
      	if(biggest < numbers[i])
          biggest = numbers[i];
    }
  	return biggest;
}
Posted by: Guest on April-02-2022

Code answers related to "find a largest number in c#"

C# Answers by Framework

Browse Popular Code Answers by Language