用C语言求斐波那契数列第n项?

来源:学生作业学帮网 编辑:学帮网 时间:2024/05/14 16:29:59

用C语言求斐波那契数列第n项?

#include
main( ){
long f1,f2,f;
int i,n;
scanf("%d",&n);
f1=f2=1;
if(n