a program in c  to calculate and  display the Fibonacci series up to a given number using a while loop.

Output:
Enter the limit 8
0  1   1  2  3  5  8  13


Explanation
This C program generates the Fibonacci series using a while loop. It starts by initializing the first two numbers, n1 and n2, to 0 and 1 respectively.
The user is prompted to enter the batch limit stored in the count variable. Then the initial values are printed. Using a while loop, the program calculates the next Fibonacci number (n3) by adding the previous two numbers (n1 and n2).
This process continues until the desired number is reached and each new Fibonacci number is printed.
The loop iterates and updates the variables to advance the sequence and the program terminates after generating the specified Fibonacci sequence.


Previous :-->> 4.Write a program in c language to check if a given number is a prime number or not using a while loop.
 -->> NEXT: 6. Write a program in c language to check if a given number is a palindrome or not using a do while loop.
-->>ALL Loops Assignments in c