Exemplo n.º 1
0
    static public void Main(String[] args)
    {
        int a, b;

        Console.WriteLine("Enter the no. to determine the LCM: ");

        Console.Write("a: ");
        a = Int32.Parse(Console.ReadLine());
        Console.Write("b: ");
        b = Int32.Parse(Console.ReadLine());

        Console.Write("a: {0}  b: {1}\n", a, b);

        LCM obj = new LCM();
        int lcm = obj.FindLCM(a, b);

        Console.WriteLine("\nLCM of {0} and {1} = {2}\n", a, b, lcm);


        Console.ReadKey();
    }