﻿using System;
using System.Linq;

namespace LargestNumber
{
    class Program
    {
        static void Main()
        {
            int[] array = new int[3];
            for (int i = 0; i < array.Length; i++)
            {
                Console.Write("Enter a number: ");
                array[i] = int.Parse(Console.ReadLine());
            }

            int largerNumber = GetMax(array[0], array[1]);
            int largestNumber = GetMax(largerNumber, array[2]);

            Console.WriteLine("Largest number: {0}", largestNumber);
        }

        static int GetMax (int a, int b)
        {
            if (a > b)
            {
                return a;
            }
            else
            {
                return b;
            }
        }
    }
}
