CSharp - Write program to Get the Greatest from user input

Requirements

The user enters ten numbers.

The program then outputs the greatest.

Hint

You can define a variable to store the greatest number "so far."

The greatest variable is set to the least possible value at the beginning to ensure that the first entered number is always greater.

Demo

using System;
class Program/* w  ww . ja v  a2  s. c  o m*/
{
    static void Main(string[] args)
    {
        // Preparation 
        int greatest = int.MinValue;

        // Input of ten numbers 
        for (int order = 1; order <= 10; order++)
        {
            // Input 
            Console.Write("Enter " + order.ToString() + ". number: ");
            string input = Console.ReadLine();
            int number = Convert.ToInt32(input);

            // Is it greater than the greatest so far? 
            if (number > greatest)
            {
                greatest = number;
            }
        }

        // Output 
        Console.WriteLine("The greatest of entered numbers was: " + greatest.ToString());
    }
}

Result