我有一到题是求 m!/(m-n)! 的值 我是才学调用递归,我想用调用递归做这道题,
但是我做的不对,希望各位高手帮帮我[en03] [en03]
int f(int m)
{
int a;
a=m*f(m-1);
return a;
}
int k(int m,int n)
{
int b;
b=(m-n)*k(m-1,n);
return b;
}
main ()
{
int m,n,cmn;
printf("input m and n (m>=n):");
scanf("%d%d",&m,&n);
printf("cmn=%d",f(m)/k(m,n));
getch();
}