为啥输入后没反应?
# include <stdio.h>
# include <math.h>
float fac(int n){
float t =1.;
int i;
for(i=2;i<=n;i++) t*=i;
return t;
}
float cp(int n,int m){
float x;
x = fac(n)/(fac(m)*fac(n-m));
return x;
}
int main(){
int n,m;
float s;
do{
printf("Please enter two numbers n and m:\n");
scanf("%d%d\n",&n,&m);
} while (n<m);
s = cp(n,m);
printf("%n!/(%m!(%n-%m)!)=%d",n,m,n,m,s);
return 0;
}