include<stdio.h>int gcd(int a,int b){if(a%b==0)return b; return gcd(b,a%b);}int main(){int a,b; scanf("%d%d",&a,&b); printf("%d\n",gcd(a,b)); return 0;}
include<stdio.h>int gcd(int m,int n){int k;if (n>m){k=m;m=n;n=k;}k=m%n;if(k==0)return n;elsegcd(n,k);}main(){int m,n;scanf("[%d],[%d]",&m,&n);printf("The result is [%d]!\n",gcd(m,n));}希望能帮到你,满意请采纳,谢谢!!
int a = arr[0]; //第一个元素 int b = max(arr + 1, len - 1); //第二个元素起的最大值 return a b? a : b; } int main(void) { int a[] = {1,2,3,4,5,6,7,8,9,10}; printf("最大值:%d\n", max(a, sizeof(a) / sizeof(a[0]))); return 0; } C语言用递归...