HCF and LCM in C#

The following code explains the calculation of HCF and LCM in C#.

using System;
using System.Text;

namespace forgetCode
{

    class program
    {
        public static void Main()
        {
            int a, b, x, y, t, gcd, lcm;
            Console.WriteLine("Enter two integers\n");
            x=Convert.ToInt32(Console.ReadLine());
            y = Convert.ToInt32(Console.ReadLine());

            a = x;
            b = y;

            while (b != 0)
            {
                t = b;
                b = a % b;
                a = t;
            }

            gcd = a;
            lcm = (x * y) / gcd;
            Console.WriteLine("Greatest common divisor of {0} and {1}= {2}\n", x, y, gcd);
            Console.WriteLine("Least common multiple of{0} and {1}= {2}\n", x, y, lcm);
            

        }
    }
}


Output:
Enter two integers

8
12
Greatest common divisor of 8 and 12= 4

Least common multiple of8 and 12= 24