CSharp - Write program to Get The Second Greatest among user input

Requirements

You will get the second greatest number out of the ten entered ones.

Hint

You need to store and update the two largest numbers.

Demo

using System;
class Program//from  w  w w  .j a v  a 2  s.c om
{
    static void Main(string[] args)
    {
        int greatest = int.MinValue;
        int secondGreatest = int.MinValue;

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

            if (number > greatest)
            {
                secondGreatest = greatest;

                greatest = number;
            }
            else
            {
                if (number > secondGreatest)
                {
                    secondGreatest = number;
                }
            }
        }
        Console.WriteLine("The second greatest of entered numbers was: " + secondGreatest.ToString());
    }
}

Result