牛牛学数列5
牛牛学数列5
http://www.nowcoder.com/questionTerminal/6db6674518a9456198c166bcd0d2aaa1
include<stdio.h>
main()
{int n,m,f1=1,f2=1,f;
scanf("%d",&n);
if(n<3)
{printf("%d",f1);}
else
{for(m=2;m<n;m++)
{f=f1+f2;
f1=f2;
f2=f;}
printf("%d",f);}}