diff --git a/assignment/C/lixinyi/work1 b/assignment/C/lixinyi/work1 new file mode 100644 index 0000000000000000000000000000000000000000..3636014823728d7ee6c982dd506f4f91f5d719c3 --- /dev/null +++ b/assignment/C/lixinyi/work1 @@ -0,0 +1,109 @@ +#include +#include +#include +#include +// assert(x)的作用是,如果x为假,则报错并终止程序运行 + +// 返回n的降k阶乘:n*(n-1)*(n-2)*...*(n-k+1) +int falling(int n, int k) +{ + int result =1; + for(int i=0;i