当前位置:网站首页>第一章: 舍罕王失算
第一章: 舍罕王失算
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;
}
結果:
边栏推荐
- Common text labels
- Differential constrained SPFA
- Flutter network and data storage framework construction-b1
- Go home early today
- Record: pymysql is used in pycharm to connect to the database
- Free year-end report summary template Welfare Collection
- 我们做了一个智能零售结算平台
- [water quality prediction] water quality prediction based on MATLAB Fuzzy Neural Network [including Matlab source code 1923]
- QT -- qfileinfo file information reading
- Pecan — Overview
猜你喜欢
OSPF - detailed explanation of stub area and full stub area
Record: MySQL changes the time zone
What does a really excellent CTO look like in my eyes
01. Preparation for automated office (free guidance, only three steps)
[new year job hopping season] test the technical summary of interviewers' favorite questions (with video tutorials and interview questions)
[free sharing] kotalog diary2022 plan electronic manual ledger
第一章:递归求n的阶乘n!
Think of new ways
Summary of composition materials for 2020 high-frequency examination center of educational resources
PyTorch中在反向传播前为什么要手动将梯度清零?
随机推荐
We have built an intelligent retail settlement platform
第一章:简化同码小数和s(d, n)
EGO Planner代码解析bspline_optimizer部分(1)
Octopus online ecological chain tour Atocha protocol received near grant worth $50000
Sqlalchemy - subquery in a where clause - Sqlalchemy - subquery in a where clause
第一章:求所有阶乘和数,大奖赛现场统分程序设计,三位阶乘和数,图形点扫描,递归求n的阶乘n!,求n的阶乘n!,舍罕王失算
Php based campus lost and found platform (automatic matching push)
Ctrip will implement a 3+2 work system in March, with 3 days on duty and 2 days at home every week
High concurrency Architecture - read write separation
第一章:喝汽水,阶梯电费计算,阶梯电费计算函数,个人所税,求解平方根不等式,简化求解平方根不等式,求解调和级数不等式,解不等式:d<1+1/2-1/3+1/4+1/5-1/6+..士1/n
Recommend a GIF processing artifact less than 300K - gifsicle (free download)
Zhang Fei hardware 90 day learning notes - personal record on day 5. Please see my personal profile / homepage for the complete record
QT -- qfile file read / write operation
【Proteus仿真】用24C04与1602LCD设计的简易加密电子密码锁
Common text labels
SQL injection for Web Security (1)
High concurrency architecture cache
我们做了一个智能零售结算平台
Read the paper glodyne global topology preserving dynamic network embedding
Find the median of two positive arrays