View Code of Problem 60

#include <stdio.h>  
int main()
{
	int a, b, c, n, temp, sum = 0;
	int i=1;
	int j;
	scanf("%d", &n);
	while(n--)
	{   i=1;
		scanf("%d", &a);
		b = 1, c = 1;
     	for(j = 0; j < a; j++){
				sum = b + c;
				//temp = b;
				b = c;
				c = sum;
			}
		
		printf("Scenario #%d:\n%d\n\n", i++ , sum);
	}
	return 0;
}

Double click to view unformatted code.


Back to problem 60