斐波那契数列

package com.program;it

public class Rabbits { public static void main(String[] args) {// a(n)=a(n-1)+a(n-2) (n>=3) System.out.println(1 + " " + "1"); System.out.println(2 + " " + "2"); int f1 = 1, f2 = 1, f, m = 24; for (int i = 3; i <= m; i++) { f = f2; f2 = f1 + f2; f1 = f; System.out.println(+i + " " + f2); } }class

}static