一些C语言里面的编程

C语言的知识还是不要忘的好:

1、求最大公约数的函数:

#include <stdio.h>
#define min(a,b) (a)>(b)?(b):(a)
int gcd(int a,int b)
{
    return b==0?a:gcd(b,a%b);
}

猜你喜欢

转载自www.cnblogs.com/cymwill/p/9178259.html
今日推荐