感觉意思差不多就这样了,但是结果老是0,不知道问题出哪里了
#include<iostream> using namespace std; int Multi(int m,int n) { int s=1,i; for(i=n;i<=m;i++) { s=s*i; } return s; } int Fabricate(int m,int n) { int s; s=Multi(m,1)/(Multi(n,1)*Multi(m,n)); return s; } int main() { int m,n,s; cout<<"m=";cin>>m; cout<<"n=";cin>>n; s=Fabricate(m,n); cout<<"s="<<s<<endl; return 0; }</code></p>