Write a C++ class to compute the GCD and LCM.

The class should be able to store the two numbers to compute theirGCD and LCM.

The class should have the following methods:

– void setNumbers(int, int);

– int getGCD(void);

– int getLCM(void);

You may use a constructor instead of setNumbers method.

Also write a simple C++ program that will implement the classabove.

## Expert Answer

Answer to Write a C++ class to compute the GCD and LCM. The class should be able to store the two numbers to compute their GCD and…