Académique Documents
Professionnel Documents
Culture Documents
largest number
using System;
namespace SimpleCodingQuestions
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine(FindLargestNumber(6, 3, 9));
Console.WriteLine(FindLargestNumber(6));
Console.WriteLine(FindLargestNumber(6, 3, 9, 2, 5, 8));
}
public static long FindLargestNumber(long a, params long[]
numbers)
{
// assume that the first value is the biggest
long biggest = a;
return biggest;
}
}
}