一些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);
}

 

posted @ 2018-06-13 15:59  chen狗蛋儿  阅读(139)  评论(0编辑  收藏  举报