算法竞赛入门经典_递归

递归函数:

C++语言:

 
 
#include<cstdio> int f(int n) {     return n == 0 ? 1 : f(n-1)*n; } int main(){     cout<<f(3)<<endl;     return 0;
}

猜你喜欢

转载自blog.csdn.net/qq_38734403/article/details/80465340