当前位置:网站首页>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 :
边栏推荐
- Scrape crawler framework
- Driveseg: dynamic driving scene segmentation data set
- Luogu-p1107 [bjwc2008] Lei Tao's kitten
- [disease identification] machine vision lung cancer detection system based on Matlab GUI [including Matlab source code 1922]
- [academic related] how to find the innovation of top papers? Chinese universities won the CVPR Best Student Thesis Award for the first time
- Summary of composition materials for 2020 high-frequency examination center of educational resources
- Bad mentality leads to different results
- PyTorch中在反向传播前为什么要手动将梯度清零?
- Streaming media server (16) -- figure out the difference between live broadcast and on-demand
- Comments on flowable source code (37) asynchronous job processor
猜你喜欢

05 -- QT OpenGL draw cube uniform

These problems should be paid attention to in the production of enterprise promotional videos

Analysis of dart JSON encoder and decoder

第一章:三位阶乘和数,图形点扫描

东数西算拉动千亿产业,敢啃“硬骨头”的存储厂商才更有机会

Common text labels
![[mathematical modeling] ship three degree of freedom MMG model based on MATLAB [including Matlab source code 1925]](/img/a9/d89ee2b88517eea6b3c38d72cf099f.jpg)
[mathematical modeling] ship three degree of freedom MMG model based on MATLAB [including Matlab source code 1925]

01 - QT OpenGL display OpenGL window

第一章: 舍罕王失算

Record the errors reported when running fluent in the simulator
随机推荐
2020 intermediate financial management (escort class)
我们做了一个智能零售结算平台
Verilog HDL continuous assignment statement, process assignment statement, process continuous assignment statement
The way to treat feelings
第一章:求同吗小数和s(d, n)
Free hand account sharing in September - [cream Nebula]
Simulation scheduling problem of SystemVerilog (1)
第二章:求长方体数组,指定区间内的完全数,改进指定区间内的完全数
达梦数据库的物理备份和还原简解
EGO Planner代碼解析bspline_optimizer部分(1)
[wallpaper] (commercially available) 70 wallpaper HD free
第二章:求a,b的最大公约与最小公倍数经典求解,求a,b的最大公约与最小公倍数常规求解,求n个正整数的的最大公约与最小公倍数
为什么要做特征的归一化/标准化?
第二章:基于分解的求水仙花数,基于组合的求水仙花数, 兰德尔数,求[x,y]内的守形数,探求n位守形数,递推探索n位逐位整除数
BUUCTF
第一章: 舍罕王失算
Integrated easy to pay secondary domain name distribution system
Think of new ways
High concurrency Architecture - distributed search engine (ES)
Floating source code comment (38) parallel job processor