九度教程第93题
C语言源码:[cpp]#include<stdio.h>long long f[100];int main(){int i,n;while(scanf("%d",&n)!=EOF){f[1]=1;f[2]=2;for(i=3;i<=n;i++)f[i]=f[i-1]+f[i-2];printf("%lld\n",f[n]);}}
补充:软件开发 , C++ ,
C语言源码:[cpp]#include<stdio.h>long long f[100];int main(){int i,n;while(scanf("%d",&n)!=EOF){f[1]=1;f[2]=2;for(i=3;i<=n;i++)f[i]=f[i-1]+f[i-2];printf("%lld\n",f[n]);}}
补充:软件开发 , C++ ,