当前位置:网站首页>c語言解决爬樓梯問題
c語言解决爬樓梯問題
2022-06-09 17:21:00 【m0_64365851】
#include<stdio.h>
int climb(n)
{
if(n==1)
return 1;
if(n==2)
return 2;
if(n>=3)
return climb(n-1)+climb(n-2);
}
void main()
{
int n;
printf("請輸入樓梯的階數:");
scanf("%d",&n);
printf("一共有%d種方法",climb(n));
}
边栏推荐
猜你喜欢

Sbio | Chenyun group of Zhejiang University Review on the interaction mechanism between bacteria and fungi in agriculture

隔空手势交互,在现实世界上演“得心应手”

Scientific research practice | the visualization and visual analysis laboratory of Peking University enrolls summer interns and graduate students

La seconde guerre mondiale a été piégée dans ces 4 points d'erreur, un an de plus pour rien!

使用tesseract识别图片中的文字

Use testeract to recognize text in pictures

安装idea

一款高颜值开源知识管理工具

解决Chrome提示:“您的连接不是私密连接“,且无继续访问选项问题

Word tutorial, how to change line spacing in word?
随机推荐
[Docker]MySql 定时备份
Pyepics device: collection of PVS
"Forget to learn again" shell Basics - 28. Description of conditional expressions in awk
Top level templates (including contract, tender, graduation defense and other templates in all aspects of work)
小程序启动性能优化实践
在页面中给元素添加事件的几种语法
sqllite create a database
蓝桥杯2022年第十三届省赛真题-积木画
DZ plug-in - free DZ plug-in collection of all plug-in functions
pta7-6悄悄关注
AUTOCAD——坐标引线标注
谷歌浏览器书签保存在哪里以及书签导入导出方法
Android caching mechanism lrucache
项目右键添加引用,提示:对COM组件的调用返回了错误HRESULT E_FAIL
[blockbuster] the cloud store brand has been upgraded, and the surprise award is coming! Participate in interactive sampling of Huawei's latest folding mobile phones
c语言解决爬楼梯问题
【華東師範大學】初試複試考研資料分享
Key ideas of enterprise service end defense
Oracle一些DDL操作
Arm instruction set review | basic instruction usage