斐波那契兔子问题 [英] The Fibonacci Rabbit Problem

查看:131
本文介绍了斐波那契兔子问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

一年内一对一对可养成几对兔子:
某人在某个封闭的地方有一对兔子,一个人想知道一年之内从这对兔子中造出了多少只兔子,因为它们在一个月内可以生下另一对.一个月出生的人也要承担

帮助我编写伪代码程序及其全部C ++代码

How Many Pairs of Rabbits Are Created by One Pair in One Year:
A certain man had one pair of rabbits together in a certain enclosed place, and one wishes to know how many are created from the pair in one year when it is the nature of them in a single month to bear another pair, and in the second month those born to bear also

help me to write pseudocode program and its entire C++ codes

推荐答案

我们不为人们做作业.并不是说我们觉得自己做得太好,甚至太忙,而是因为学习如何成为一名程序员的一部分是学习如何分析问题,设计解决方案,最后,实施该解决方案.

您并没有要求有经验的程序员来为您做功课.
We don''t do homework for people. It''s not that we feel like we''re too good to do it, or even too busy, but it''s because part of learning how to be a programmer is learning how to analyze the problem, design a solution, and finally, implement that solution.

You''re not learning ANYTHING by asking experienced programmers to do your homework for you.


(2 * 12)^ 2

您今年在学校的及格率:99%^-2对

明年可以尝试3对.
( 2 * 12 ) ^ 2

Your pass rate for this year at school : 99% ^ - 2 pairs

Could try 3 pairs next year.


为什么不先在Excel中进行计算,然后在弄清楚后再编写代码?
Why don''t you work it out in Excel and then write code after you figure it out?


这篇关于斐波那契兔子问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆