文件名称:shiyan1
- 所属分类:
- Windows编程
- 资源属性:
- [Windows] [Visual C] [源码]
- 上传时间:
- 2012-11-26
- 文件大小:
- 867kb
- 下载次数:
- 0次
- 提 供 者:
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
编程序,使用如下所谓的简单变量“数据平移”方法来求出Fibonacci数列的第n项(的具体项值)并显示在屏幕上(正整数n通过键盘输入):说明变量old1=1,old2=1,newItem;新的Fibonacci项newItem总是“距它最近”的前两项(old1与old2)的累加和。而后通过“old1=old2 old2=newItem ”进行所谓的“数据平移”。接着计算另一个新的Fibonacci项newItem,依次循环,直到求出数列的第n项时为止。
Fibonacci数列的计算公式如下:
fib(1) = 1;
fib(2) = 1;
fib(n) = fib(n-1) + fib(n-2); //对大于等于3的任意n
-Programmed, use the following so-called simple variables Data Translation approach in order to obtain the first Fibonacci series n-item (the specific items of value) and displayed on the screen (positive integer n, through keyboard input): Descr iption of variables old1 = 1, old2 = 1, newItem new items NewItem Fibonacci always away from it recently, the first two (old1 with old2) and cumulative. Then through old1 = old2 old2 = newItem the so-called data translation. Then a new calculation of the Fibonacci item newItem, followed by cycle, calculated until the first series until n items. Fibonacci series of calculation formula is as follows: fib (1) = 1 fib (2) = 1 fib (n) = fib (n-1)+ Fib (n-2) // greater than or equal to 3 on the arbitrary n
Fibonacci数列的计算公式如下:
fib(1) = 1;
fib(2) = 1;
fib(n) = fib(n-1) + fib(n-2); //对大于等于3的任意n
-Programmed, use the following so-called simple variables Data Translation approach in order to obtain the first Fibonacci series n-item (the specific items of value) and displayed on the screen (positive integer n, through keyboard input): Descr iption of variables old1 = 1, old2 = 1, newItem new items NewItem Fibonacci always away from it recently, the first two (old1 with old2) and cumulative. Then through old1 = old2 old2 = newItem the so-called data translation. Then a new calculation of the Fibonacci item newItem, followed by cycle, calculated until the first series until n items. Fibonacci series of calculation formula is as follows: fib (1) = 1 fib (2) = 1 fib (n) = fib (n-1)+ Fib (n-2) // greater than or equal to 3 on the arbitrary n
相关搜索: 累加和
(系统自动生成,下载前可以参看下载内容)
下载文件列表
shiyan1
.......\Debug
.......\fibonacci.cpp
.......\fibonacci.dsp
.......\fibonacci.dsw
.......\fibonacci.ncb
.......\fibonacci.opt
.......\fibonacci.plg
.......\Debug
.......\fibonacci.cpp
.......\fibonacci.dsp
.......\fibonacci.dsw
.......\fibonacci.ncb
.......\fibonacci.opt
.......\fibonacci.plg