View Code of Problem 60

#include<stdio.h>
int main()
{
   int t,i,count,h,d;
   d=1;
   scanf("%d",&t);
  while(t--)
  {
     int a=1;
    int b=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);
    printf("\n");
  }
}

Double click to view unformatted code.


Back to problem 60