写了一段相关的代码,好久不写了
#include#include #include using namespace std;int func(int a, int b) { if (a < b) { a = a ^ b; b = a ^ b; a = a ^ b; } while (b != 0) { int c = a % b; a = b; b = c; } return a;}int func2(int a, int b) { int c = func(a, b); return c * (a/c) * (b/c);}int main() { std::cout << "Hello, World!" << std::endl; cout << func(33, 44) << endl; cout << func2(33, 44) << endl; return 0;}