Post Top Ad

Your Ad Spot

Pages

Monday, 10 February 2020

Write a Program tTo Print Fibonacci Serise To Given Range A To B

#include<stdio.h>
#include<conio.h>

void Fibonacci(int x,int y)
{
   int i,a=0,b=1,c;
   
while(a<=y)

   if(a>=x)
  printf("  %d",a);
c=a+b;
a=b;
b=c;
}
  }
  void main()
  { 
    Fibonacci(8,22);
  }

No comments:

Post a Comment

Post Top Ad

Your Ad Spot

Pages