当前位置:网站首页>第一章: 舍罕王失算
第一章: 舍罕王失算
2022-07-03 19:19:00 【股_四】
int main()
{
double t, s, v, p;
int i, n;
printf(" 請輸入格數n:");
scanf("%d", &n);
t = 1;
s = 1;
for (i = 2; i <= n; i++)
{
t = t * 2;
s += t;
}
v = s / 2.4e7;
p = v / 2.48e9;
if (n <= 40) printf(" 總麥粒數為:%.0f\n", s);
else printf(" 總麥粒數為:%.3e\n", s);
printf(" 小麥重量約為:%f噸\n", v);
printf(" 約相當於世界糧食年總產量的%.0f倍\n", p);
return 0;
}
結果:
边栏推荐
- Octopus online ecological chain tour Atocha protocol received near grant worth $50000
- High concurrency Architecture - distributed search engine (ES)
- Succession of flutter
- Floating source code comment (38) parallel job processor
- Le changement est un thème éternel
- Dart JSON编码器和解码器剖析
- 第二章:求a,b的最大公约与最小公倍数经典求解,求a,b的最大公约与最小公倍数常规求解,求n个正整数的的最大公约与最小公倍数
- Which do MySQL and Oracle learn?
- I didn't cancel
- Thesis study - 7 Very Deep Convolutional Networks for Large-Scale Image Recognition (3/3)
猜你喜欢
记录在模拟器中运行flutter时报的错
Yolov3 network model building
[mathematical modeling] ship three degree of freedom MMG model based on MATLAB [including Matlab source code 1925]
The earliest record
The installation path cannot be selected when installing MySQL 8.0.23
我眼中真正优秀的CTO长啥样
Thesis study - 7 Very Deep Convolutional Networks for Large-Scale Image Recognition (3/3)
第一章: 舍罕王失算
Ctrip will implement a 3+2 work system in March, with 3 days on duty and 2 days at home every week
【LeetCode】【SQL】刷题笔记
随机推荐
[water quality prediction] water quality prediction based on MATLAB Fuzzy Neural Network [including Matlab source code 1923]
Scrapy爬虫框架
Floating source code comment (38) parallel job processor
EGO Planner代码解析bspline_optimizer部分(3)
第一章:递归求n的阶乘n!
Understanding of database architecture
EGO Planner代码解析bspline_optimizer部分(1)
Record: writing MySQL commands
If the warehouse management communication is not in place, what problems will occur?
为什么要做特征的归一化/标准化?
The earliest record
Record: MySQL changes the time zone
Comments on flowable source code (37) asynchronous job processor
High concurrency Architecture - separate databases and tables
Driveseg: dynamic driving scene segmentation data set
第一章:求同吗小数和s(d, n)
Redis master-slave synchronization, clustering, persistence
Merge K ascending linked lists
Does SQL always report foreign key errors when creating tables?
How to build an efficient information warehouse