#include <stdio.h>
int main()
{
int i;
int a;
int b;
int c;
int n;
printf("please enter a number:");
scanf("%d", &n);
a=b=1;
for(i=3; i<=n; i++)
{
c=a+b;
a=b;
b=c;
}
printf("The result is %d\n", c);
return 0;
}
![](https://img-my.csdn.net/uploads/201304/25/1366882200_7404.png)