#include <stdio.h>
int main()
{
int m,n,P;
int f(int x); /*声明函数*/
printf("请输入 m and n 的值!\n");
scanf("%d%d",&m,&n);
P=f(n)/f(n-m); /*计算n!/(n-m)!的计算公式*/
printf("P=%d\n",P);
return 0;
}
int f(int x)
{
if(x==1)
return 1;
else
return f(x-1)*x; /*返回下次计算*/
}
标签:return,语言,int,scanf,d%,printf,include,求出 From: https://blog.51cto.com/u_15865347/5893715