View Code of Problem 60

#include<stdio.h>
int main()
{
   int t,i,count,h;
   scanf("%d",&t);
  while(t--)
  {
     int a=1;
    int b=1;
    int d=1;
    scanf("%d",&h);
    for(i=1;i<=h;i++)
    {
      count=a+b;
      a=b;
      b=count;
    }
    printf("Scenario #:%d\n",d++); 
    printf("%d\n",count);
  }
}

Double click to view unformatted code.


Back to problem 60