裴波那契数列ruby实现

2019PHP高薪工程师学习路线图....>>>

def fib n 
	i = 2
	a ,b = 1, 1
	while i < n
		a,b = b, a+b
		i += 1
	end
	b
end
p fib 16
#打印987