how to find a GCD in C++ programming​