第9次作业

package com.yingyong.day14;

public class FiberList {

public static void main(String[] args) {
    // TODO Auto-generated method stub
    int f1 = 1;
    int f2 = 1;
    int f3 = 0;
    System.out.print(f1+","+f2+",");
    for(int i=1;i<19;i++){
    f3 = f1+f2;
    f1 = f2;
    f2 = f3;
    System.out.print(f2+",");

}

}
}

猜你喜欢

转载自blog.51cto.com/14980893/2556069

相关文章

今日推荐