View Code of Problem 60

#include<stdio.h>
int main(){
	int m,n,s,num,x,y;
	scanf("%d",&n);
	m=n;
	while(n--){
		x=1;
		num=2;
		scanf("%d",&s);
		for(int i=0;i<s-1;i++){
			y=num;
			num=x+num;
			x=y;
		}
		printf("Scenario #%d:\n%d\n",m-n+1,num);
	}
} 

Double click to view unformatted code.


Back to problem 60