C++习题(求阶乘)

  • Post author:
  • Post category:其他


C++习题


题目


编写程序求下面表达式的值:

K=n! / ( m! (n-m)! ), n>=m


代码实现

#include <iostream>

using namespace std ;

//求阶乘函数
int getFactorial(int n) {
   
	int sum = 1 ;
	for 



版权声明:本文为m0_51147719原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。