package com.yingyong.day08;
public class FiderList {
public static void main(String[] args) { // TODO Auto-generated method stub int f1,f2,f3,i; f1 = 1; f2 = 2; System.out.print(f1 +","); System.out.print(f2 + ","); for(i = 3;i <=20;i++) { f3 = f1 +f2; System.out.print(f3 + ","); f1 = f2; f2 = f3;
}
} } 结果: 1,2,3,5,8,13,21,34,55,89,144,233,377,610,987,1597,2584,4181,6765,10946,