C Program To find the fibonacci numbers below a given number.

by Nideesh C on April 18, 2011 · 0 comments

in C Programming




#include<stdio.h>
void main()
{
int lim_up, A = 0, B = 1, C;
clrscr();
printf(“nnt ENTER THE UPPER LIMIT…: “);
scanf(“%d”, &lim_up);
printf(“nnt FIBONACCI NUMBERS ARE…: “);
while(A<lim_up)
{
printf(“nnttt%d”, A);
C = A + B;
A = B;
B = C;
}
getch();
}

Not Satisfied ? Just search & get the result

Related Posts Plugin for WordPress, Blogger...
Be Sociable, Share!

Related posts:

  1. C Program to find the prime numbers below a given number.
  2. C Program to find the prime numbers between a given range
  3. C Program to find the perfect numbers between a given range
  4. C Program for Armstrong numbers
  5. C Program to find the perfect numbers below a given number.

Leave a Comment

Previous post:

Next post: