View Code of Problem 23

#include<stdio.h>
int main()
{
	int big,small,i,m; 
	while(scanf("%d",&m))
	{
		if(m==0)
		break;
		for(i=1,big=0,small=1;i<=m;i++)
		{
			big=big+small;
			small=big-small;
		}
		printf("%d\n",big+small);
	}
	return 0;
 } 

Double click to view unformatted code.


Back to problem 23