int getFactorial(int data) //求阶乘;{ int resData=1; for (int i=0;i { resData*=i; } return resData;}定义一个函数求阶乘,然后再写一个输入M 和N的函数套进去不就行了。。。
用递归做。写一个自定义函数就行了