标签:
#include <stdio.h> int fbla(int n) { int f = 0, g = 1; while (n-- > 0) { g = g + f; f = g - f; } return g; } int main() { int n; scanf("%d", &n); printf("%d\n", fbla(n)); }
斐波那契数列
原文地址:http://www.cnblogs.com/maxin/p/5499353.html