answersLogoWhite

0

Program to Print Fibonacci Series

#include
#include
void main()
{
int n,i,f1=0,f2=1,f3;
clrscr();
printf("Enter n number : ");
scanf("%d",&n);
printf("%d\t%d",f1,f2);
for(i=3;i<=n;i++)
{
f3=f1+f2;
printf("\t%d",f3);
f1=f2;
f2=f3;
}
getch();
}

Output :

Enter n number : 10
0 1 1 2 3 5 8 13 21 34

User Avatar

Wiki User

15y ago

What else can I help you with?

Related Questions

Explain how to find the terms of Fibonacci sequence?

If the Fibonacci sequence is denoted by F(n), where n is the first term in the sequence then the following equation obtains for n = 0.


Can you explain the program of Fibonacci series in c?

You mean you have written a program, but you don't understand it? Well, how could I explain it without seeing it?


What types of statement can be used to explain the steps of a proof?

The corollaries types of statement is what is used to explain the steps of a proof.


What types of the statement can be used to explain the steps of a proof?

The corollaries types of statement is what is used to explain the steps of a proof.


Explain with suitable example how switch statement is differ from if statement?

www.assignmentsclub.com


Explain numerical statements of facts that are not statistics?

all statistics are numerical statement but all numerical statement s of are not statistics explain


Can you explain Fibonacci's rabbit problem and find a diagram to explain?

Fibonacci's rabbit problem involves tracking the reproduction of rabbits over time, where each pair of rabbits produces another pair every month. The sequence of numbers that arises from this scenario is known as the Fibonacci sequence. A diagram typically shows the number of rabbit pairs at each time step, illustrating how the numbers grow according to the sequence.


What is used to explain something with a simple statement?

a generalization


Why did Fibonacci think the Fibonacci sequence was so interesting?

Because it is so interesting.. . .. ... ..... ........ ............. .....................Fibonacci first published a use for the pattern to explain bunny population growth in his book Liber Abaci (1202).Other interesting uses for the Fibonacci Sequence:The Golden Ratio and The Golden Spiral (as seen in DaVinci's Vitruvian Man)Phyllotaxis (how leaves appear on stem)Predicting stock share pricing (Fibonacci retractment)Graphs interconnecting parallel and distributed systems (Fibonacci Cubes)The Core in Cornwall, UK (architecture)The chorus of Astronomy, a hip-hop song by Black StarThe time signatures and syllable structure of the Toolsong LateralusAncestry of male bees


Explain this statement music is the fruit of love?

This statement is saying that music is inspired by love, and is the result of the latter.


How do you explain the structure of an analysis essay?

state the theme, back up your statement with evidence, then explain why it is universal


What does BAS stand for and explain its use?

business activity statement