当前位置:网站首页>Chapter 1: recursively find the factorial n of n!
Chapter 1: recursively find the factorial n of n!
2022-07-03 19:21:00 【Shares_ four】
long fac1(int n)
{
long f;
if (n == 1) f = 1;
else f = n * fac1(n - 1);
return (f);
}
int main()
{
int n;
long y;
printf(" Please enter n(n < 13):");
scanf("%d", &n);
if (n > 12)
{
printf(" Input n Over the limit 12, Please re-enter n.\n");
return 0;
}
y = fac1(n);
printf(" %d! = %ld\n", n, y);
return 0;
}
result :
边栏推荐
- flask 生成swagger文档
- Common text labels
- Comments on flowable source code (37) asynchronous job processor
- 第二章:求长方体数组,指定区间内的完全数,改进指定区间内的完全数
- 【水质预测】基于matlab模糊神经网络水质预测【含Matlab源码 1923期】
- 我们做了一个智能零售结算平台
- 【光学】基于matlab介电常数计算【含Matlab源码 1926期】
- 我眼中真正优秀的CTO长啥样
- The online customer service system developed by PHP is fully open source without encryption, and supports wechat customer service docking
- Pecan - route
猜你喜欢
[optics] dielectric constant calculation based on MATLAB [including Matlab source code 1926]
[optics] vortex generation based on MATLAB [including Matlab source code 1927]
SSM整合-前后台协议联调(列表功能、添加功能、添加功能状态处理、修改功能、删除功能)
Record: pymysql is used in pycharm to connect to the database
What is the content of game modeling
我眼中真正优秀的CTO长啥样
第一章:求同吗小数和s(d, n)
Nous avons fait une plateforme intelligente de règlement de détail
Think of new ways
Recommend a GIF processing artifact less than 300K - gifsicle (free download)
随机推荐
Merge K ascending linked lists
Compared with 4G, what are the advantages of 5g to meet the technical requirements of industry 4.0
第一章:求n的阶乘n!
第一章: 舍罕王失算
High concurrency Architecture - separate databases and tables
Web Security (VIII) what is CSRF attack? Why can token prevent csdf attacks?
04 -- QT OpenGL two sets of shaders draw two triangles
Php based campus lost and found platform (automatic matching push)
第一章:拓广同码小数和s(d, n)
During MySQL installation, the download interface is empty, and the components to be downloaded are not displayed. MySQL installer 8.0.28.0 download interface is empty solution
[disease identification] machine vision lung cancer detection system based on Matlab GUI [including Matlab source code 1922]
[optics] dielectric constant calculation based on MATLAB [including Matlab source code 1926]
The space of C disk is insufficient, and the computer becomes stuck. Quickly expand the capacity of C disk to make the system more smooth
Think of new ways
Dart JSON编码器和解码器剖析
Pytorch introduction to deep learning practice notes 13- advanced chapter of cyclic neural network - Classification
交叉编译Opencv带Contrib
01 - QT OpenGL display OpenGL window
These problems should be paid attention to in the production of enterprise promotional videos
This Chinese numpy quick look-up table is too easy!