当前位置:网站首页>切面条 C语言
切面条 C语言
2022-07-01 21:47:00 【大菜彩】
切面条
一根高筋拉面,中间切一刀,可以得到2根面条。
如果先对折1次,中间切一刀,可以得到3根面条。
如果连续对折2次,中间切一刀,可以得到5根面条。 那么,连续对折10次,中间切一刀,会得到多少面条呢?
思路:
源码:
#include<stdio.h>
#include<math.h>
int main()
{
double sum=2;
for(int n=1;n<=10;n++)
sum+=pow(2.0,n-1);
printf("%.0f",sum);
return 0;
}
边栏推荐
- PyTorch磨刀篇|argmax和argmin函数
- [commercial terminal simulation solution] Shanghai daoning brings you Georgia introduction, trial and tutorial
- Using closures to switch toggle by clicking a button
- Introduction and download of the latest version of airserver2022
- Several ways of writing main function in C
- Why must digital transformation strategies include continuous testing?
- 企业架构与项目管理的关联和区别
- MySQL之MHA高可用配置及故障切换
- RestTemplate 远程调用工具类
- Simple interactive operation of electron learning (III)
猜你喜欢
Sonic云真机学习总结6 - 1.4.1服务端、agent端部署
Introduction and download of the latest version of airserver2022
Training on the device with MIT | 256Kb memory
Dark horse programmer - software testing - stage 06 2-linux and database-01-08 Chapter 1 - description of the content of the Linux operating system stage, description of the basic format and common fo
Business visualization - make your flowchart'run'up
从零开始学 MySQL —数据库和数据表操作
完全注解的ssm框架搭建
linux下清理系统缓存并释放内存
In the past 100 years, only 6 products have been approved, which is the "adjuvant" behind the vaccine competition
Mysql——》Innodb存储引擎的索引
随机推荐
Yyds dry goods inventory # solve the real problem of famous enterprises: egg twisting machine
linux下清理系统缓存并释放内存
RestTemplate 远程调用工具类
Slope compensation
Learn MySQL from scratch - database and data table operations
【MySQL】explain的基本使用以及各列的作用
Business visualization - make your flowchart'run'up
Dark horse programmer - software testing - stage 06 2-linux and database-01-08 Chapter 1 - description of the content of the Linux operating system stage, description of the basic format and common fo
CSDN购买的课程从哪里可以进入
Why must digital transformation strategies include continuous testing?
#yyds干货盘点# 解决名企真题:扭蛋机
MQ learning notes
GenICam GenTL 标准 ver1.5(4)第五章 采集引擎
Can you get a raise? Analysis on gold content of PMP certificate
flink sql-client 使用 对照并熟悉官方文档
【单体】流辰信息I-BPSv3服务器推荐配置
JVM有哪些类加载机制?
MySQL MHA high availability configuration and failover
Which securities company should we choose to open an account for flush stock? Is it safe to open an account with a mobile phone?
Indicator trap: seven KPI mistakes that it leaders are prone to make