摘要: #include <iostream.h> void Union(int A[ ], int n, int B[ ], int m, int C[ ] ); int main() { int i, C[12]; int A[5] = {1, 3, 5, 7, 9}; int B[7] = {2, 3 阅读全文
posted @ 2019-08-18 10:39 9529 阅读(53) 评论(0) 推荐(0)
摘要: 欧几里得算法又称辗转相除法,用于求两数的最大公约数,计算公式为GCD(a,b)=GCD(b,a%b); #include<iostream.h> int CommFactor2(int m, int n); int main() { int a, b, r; cout<<"请输入两个自然数:"; c 阅读全文
posted @ 2019-08-18 10:38 9529 阅读(181) 评论(0) 推荐(0)