CSharp - Write program to Get greater value with Math.MAX method

Requirements

You will get the bigger value of two numbers using the built-in function Math.Max.

Demo

using System;
class Program//from w w w .j  a  va  2  s .  c o m
{
    static void Main(string[] args)
    {
        // Inputs 
        Console.Write("Enter first number: ");
        string input1 = Console.ReadLine();
        int number1 = Convert.ToInt32(input1);

        Console.Write("Enter second number: ");
        string input2 = Console.ReadLine();
        int number2 = Convert.ToInt32(input2);

        // Evaluating 
        int greater = Math.Max(number1, number2);

        // Output 
        Console.WriteLine("Greater of entered numbers is: " + greater);

    }
}

Result