初学C语言,好难的不懂,一个菜鸟的问题,求代码请教下
Negative indexed Fibonacci numbers is a sequence of numbers, where each number (except the first two) is the difference of the two preceding numbers. The first two are 0 and -1.0, -1, 1, -2, 3, -5, 8, -13, 21, …
Write a program to input a number n ( 0), and print the nth negative indexed Fibonacci number (starting from the 0th number.)
Tip: You may establish a loop and compute two consecutive Fibonacci numbers in each iteration. Also, the numbers can be very large, use variables of type long long to hold them.
[此贴子已经被作者于2007-3-9 12:32:08编辑过]