(相关资料图)
1、阶乘一般自己用递归写一个函数int fun(int n) //这儿就只考虑正数的情况 {if (n == 0 || n == 1)return 1;else return fun(n-1)*n;}。
本文到此分享完毕,希望对大家有所帮助。
标签: