资 源 简 介
编写一个Java程序,用于输出Fibonacci数列的前20项。
提示:Fibonacci数列定义为:第一、二项的值为1,从第三项开始依次为前两项的和。 Fibonacci[0]=Fibonacci[1]=1 Fibonacci[i]=Fibonacci[i-2]+Fibonacci[i-1] (i>=2) -Write a Java program for Fibonacci series, the first output 20. Tip: Fibonacci sequence is defined as: first, two of the value of 1, starting from the third and was followed by the first two. Fibonacci [0] = Fibonacci [1] = 1 Fibonacci [i] = Fibonacci [i-2]+ Fibonacci [i-1] (i> = 2)