What would you like to do?

Write a Fibonacci function then takes an input from the user in main program and pass to function which prints Fibonacci series up to this number in c language?

already exists.

Would you like to merge this question into it?

already exists as an alternate of this question.

Would you like to make it the primary and merge this question into it?

exists and is an alternate of .

//program to find the fibonnacci series of n numbers.
#include <stdio.h>
void fibo(int);
void main()
{
int iLimit;
printf("Enter the number till which the fibonnacci series should be printed.");

scanf("%d",&iLimit);
fibo(iLimit);
}

void fibo(int iLimitnum)
{
int inum1,inum2,inum3;
int iadd;
inum1=0;
inum2=1;
int i;
printf("0 ");
for (i=0; ;i++)
{
iadd=inum1+inum2;
inum1=inum2;
inum2=iadd;
if(inum1 > iLimitnum)
break;
printf("%d ", inum1);

}
}
1 person found this useful
Thanks for the feedback!

Write a c program to calculate factorial of a number using stack 2write a c program to generate a Fibonacci series using stack number of Fibonacci series is input by the user?

  #include #include #include int stack[10],n=0; int fact(int); int pop(); void push(int); main() { int num; printf("\\n FACTORIAL USING STACK IMPLEMENT

Can you write a program to print the Fibonacci series in php?

  The Fibonacci sequence uses recursion to derive answers. It is defined as:   F0 = 0 F1 = 1 Fn = F(n - 1) + F(n -2)   To have this sequence printed by a php scr

How do you write a program Fibonacci series using for loop in C?

include #include main() { int a=0,b=1,c,i,n; clrscr(); printf("enter the limit of series\\n"); scanf("%d",&n); if(n==0) printf("%d\\n",a); else printf("%d\\n%d\\n",a

Write a program in C Sharp to print Fibonacci series using while loop?

//WAP to print fibonacci series using do-while loop.? using System; class Fibonacci { public static void Main() { int a=1,b=1; int sum=0; Console.Write("Enter Limit:");

Write a C- program to print Fibonacci series using do while loop?

Before jumping to program we will look how Fibonacci series are generated. Fibonacci series is linear sequence of integers, there first one is 0 and second one is 1. Now all

Write a program to print fibonacci series upto 100?

// recursive method - very slow for larger numbers unsigned long fib (unsigned long n) { if (n 1) return 0; if (n 2) return 1; return fib (n-1) + fib (n-2); } in

How can you write a C Program a recursive function to print fibonci series of a number entered by the user?

You cannot produce a Fibonacci sequence with a single number. Each number in the sequence is the sum of the previous two numbers, which traditionally begins with the numbers 0