日期:2014-05-20 浏览次数:20742 次
public static unsigned int fib(int n){ unsigned int fn=0,f0=1,f1=1; for(int i = 1;i < n;i++){ fn = f0 + f1; f0 = f1; f1 = fn; } return fn; }