View Code of Problem 23

#include <stdio.h>

int main(){
	int M;
	while(scanf("%d",&M)!=EOF&&M!=0&&M<=90){
		long long int small=0,big=1,sum=0;
		while(M--){
			sum = big+small;
			small = big;
			big = sum;
		}
		printf("%ld\n",sum);
	}
} 

Double click to view unformatted code.


Back to problem 23