当前位置:网站首页>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 :
边栏推荐
- 论文阅读 GloDyNE Global Topology Preserving Dynamic Network Embedding
- Scrape crawler framework
- SSM整合-前后台协议联调(列表功能、添加功能、添加功能状态处理、修改功能、删除功能)
- 第一章:拓广同码小数和s(d, n)
- FBI警告:有人利用AI换脸冒充他人身份进行远程面试
- Ctrip will implement a 3+2 work system in March, with 3 days on duty and 2 days at home every week
- Day_ 18 IO stream system
- Zhang Fei hardware 90 day learning notes - personal record on day 5. Please see my personal profile / homepage for the complete record
- Record: MySQL changes the time zone
- I study database at station B (4): DQL
猜你喜欢

Record: pymysql is used in pycharm to connect to the database

ActiveMQ的基础

第一章:拓广同码小数和s(d, n)

Pytorch introduction to deep learning practice notes 13- advanced chapter of cyclic neural network - Classification

03 -- QT OpenGL EBO draw triangle

Flume learning notes

Common text labels

PyTorch中在反向传播前为什么要手动将梯度清零?

02 -- QT OpenGL drawing triangle

I study database at station B (4): DQL
随机推荐
第一章:求n的阶乘n!
Summary of learning materials and notes of Zhang Fei's actual combat electronics 1-31
Valentine's Day - make an exclusive digital collection for your lover
05 -- QT OpenGL draw cube uniform
Zhang Fei hardware 90 day learning notes - personal record on day 5. Please see my personal profile / homepage for the complete record
Web Security (VIII) what is CSRF attack? Why can token prevent csdf attacks?
Pecan - route
The necessity of lean production and management in sheet metal industry
Dart JSON编码器和解码器剖析
Counting from the East and counting from the West will stimulate 100 billion industries. Only storage manufacturers who dare to bite the "hard bone" will have more opportunities
Go home early today
为什么要做特征的归一化/标准化?
[mathematical modeling] ship three degree of freedom MMG model based on MATLAB [including Matlab source code 1925]
DriveSeg:动态驾驶场景分割数据集
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
第二章:基于分解的求水仙花数,基于组合的求水仙花数, 兰德尔数,求[x,y]内的守形数,探求n位守形数,递推探索n位逐位整除数
交叉编译Opencv带Contrib
我們做了一個智能零售結算平臺
FBI warning: some people use AI to disguise themselves as others for remote interview
Differential constrained SPFA