#includeint main(){ using namespace std;int m, n;cin >> n >> m; while (m != n) { while (m>n) { m = m - n; } while (n>m) { n = n - m; } } printf("%d\n", m); system("pause"); return 0;}
运行结果:
本文共 298 字,大约阅读时间需要 1 分钟。
#includeint main(){ using namespace std;int m, n;cin >> n >> m; while (m != n) { while (m>n) { m = m - n; } while (n>m) { n = n - m; } } printf("%d\n", m); system("pause"); return 0;}
运行结果:
转载于:https://www.cnblogs.com/Mr210843013/p/4823549.html