//main.c //author&#xff1a;yangyang #include "stdafx.h" #define A 65 #define B 182 int min(int a, int b); int max(int a, int b); int main() {int yushu;int a[256];int*p &#61; a;int num &#61; 0; int maxnum&#61;0;for (int i &#61; 1; i <&#61; min(A,B); i&#43;&#43;){yushu &#61; min(A, B) / i;if (yushu*i &#61;&#61; min(A, B)){int yushu2 &#61; max(A, B) / yushu;if (yushu2*yushu &#61;&#61; max(A, B)){*p &#61; yushu;p&#43;&#43;;//p[i] &#61; yushu;num&#43;&#43;;} }}for (int i &#61; 1; i <&#61; num; i&#43;&#43;){if (maxnum <*p--)maxnum &#61; *p;}printf("%d和%d的最大公约数为%d\n", A, B, maxnum);return0; } int min(int a, int b) {return a } int max(int a, int b) {return a > b ? a : b; }