C program to print fibonacci series, C/C++ Programming

C program to print fibonacci series:

int fibo(long int);

void main()


                long int a=0,n;

                printf ("how many terms\n");


                for(int i=1;i<=n;i++)


                printf("%d ",a);



fibo(long int m)


                long int x;




                return x;


                else if(m==2)

                                return 1;

                else if(m==1)

                {return 0;}



Posted Date: 9/29/2012 7:24:36 AM | Location : United States

Related Discussions:- C program to print fibonacci series, Assignment Help, Ask Question on C program to print fibonacci series, Get Answer, Expert's Help, C program to print fibonacci series Discussions

Write discussion on C program to print fibonacci series
Your posts are moderated
Related Questions
(a) Write a procedure called (mult x y) that multiplies two numbers x and y in a recursive manner using successive addition. Specifically, note that a x b = a + a + .... + a (b tim

Explain about Evaluation of Expression in c language? An Expressions are evaluated using an assignment statement of the form: variable = expression; The Variable is any v

write a function named "fact"that takes one integer arguments,call them "num" and returns as ..............

A: Provided that function parameter is "const reference", compiler create temporary variable in following two ways. a) The actual argument is the correct type, however it isn't

I am having trouble declaring a variable and returning a value from my function.

Define Advantages of Multi File Program? The main merits of spreading a program across several files are: • Teams of programmers able to work on programs. Every programmer w

#questionHi, I am looking for help with the assignment, can you help..

Write a c program to determine interchanged values between two variables?[Hint - if loop] What will be the output of the program? How many times this loop will execute? Wr

Question 1 Write a program in ‘C' to check whether a given number is even or odd Question 2 Explain while and do... while loop with an example Question 3 Write a program