当前位置:网站首页>第一章: 舍罕王失算
第一章: 舍罕王失算
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;
}
結果:
边栏推荐
- EGO Planner代码解析bspline_optimizer部分(3)
- 论文阅读 GloDyNE Global Topology Preserving Dynamic Network Embedding
- Summary of learning materials and notes of Zhang Fei's actual combat electronics 1-31
- [optics] dielectric constant calculation based on MATLAB [including Matlab source code 1926]
- Webrtc[41] - Analysis of the establishment process of webrtc transmission channel
- High concurrency architecture cache
- PyTorch中在反向传播前为什么要手动将梯度清零?
- EGO Planner代码解析bspline_optimizer部分(2)
- FBI警告:有人利用AI换脸冒充他人身份进行远程面试
- Understanding of database architecture
猜你喜欢

我们做了一个智能零售结算平台

Foundation of ActiveMQ

The online customer service system developed by PHP is fully open source without encryption, and supports wechat customer service docking

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

A green plug-in that allows you to stay focused, live and work hard

QT -- qfile file read / write operation

QT -- qfileinfo file information reading

Sentinel source code analysis part II - sentinel dashboard console startup and configuration

Day_ 18 IO stream system

Flutter network and data storage framework construction-b1
随机推荐
We have built an intelligent retail settlement platform
[free sharing] kotalog diary2022 plan electronic manual ledger
Pecan — @expose()
BUUCTF
达梦数据库的物理备份和还原简解
Zhang Fei hardware 90 day learning notes - personal record on day 5. Please see my personal profile / homepage for the complete record
Flutter网络和数据存储框架搭建 -b1
Bad mentality leads to different results
论文阅读 GloDyNE Global Topology Preserving Dynamic Network Embedding
Ego planner code parsing Bspline_ Optimizer section (2)
Le changement est un thème éternel
【数学建模】基于matlab船舶三自由度MMG模型【含Matlab源码 1925期】
Merge K ascending linked lists
第二章:求长方体数组,指定区间内的完全数,改进指定区间内的完全数
Ctrip will implement a 3+2 work system in March, with 3 days on duty and 2 days at home every week
我眼中真正优秀的CTO长啥样
【学术相关】顶级论文创新点怎么找?中国高校首次获CVPR最佳学生论文奖有感...
Ego planner code parsing Bspline_ Optimizer section (3)
cipher
Foundation of ActiveMQ