answersLogoWhite

0

#include<stdio.h> #include<conio.h> void fibo(int); void main() { int num; clrscr(); printf("\n\t Enter number of elements in series : "); scanf("%d",&num); if(num>0) fibo(num); else printf("\n\t Please enter positive number "); } void fibo(int num) { int a=0,b=1,c=0; if(num==1) printf("\n%d",a); if(num>=2) printf("\n%d\t%d\t",a,b); for(;num>2;num--) { c=a+b; a=b; b=c; printf("%3d\t",c); } getch(); }

User Avatar

Wiki User

16y ago

What else can I help you with?

Continue Learning about Engineering

Write a java script program to print first ten odd natural numbers in C?

Q.1 Write a program to print first ten odd natural numbers. Q.2 Write a program to input a number. Print their table. Q.3 Write a function to print a factorial value.


Write a program to generate the Fibonacci series using non-recursive method?

In c: int fibr(int n) { // Find nth Fibonacci number using recursion. if (n&lt;=2) return 1; // the first two Fibonacci numbers are 1 and 1 return (fibr(n-2)+fibr(n-1)); } int fibi(int n) { // Find nth Fibonacci number using iteration. int temp,last=1,f=1; int i; for (i=3;i&lt;n;++i) { // the first two Fibonacci numbers are 1 and 1 temp=f; f+=last; last=temp; } return f; }


How do you write the code for generating Fibonacci search in C programming?

Use a lookup table. The first two elements are 0 and 1 and each subsequent element is the sum of the preceding two elements. The table needn't be very large as there are only 43 Fibonacci numbers in the range 0 to 1 billion. If you need larger numbers, use long doubles.


How do you write a program to find out the square and cube of first ten natural numbers in gw basic?

First you will need to have some basic programming knowledge. You can use this to help make the program that is needed.


Program in 'c' to find the LCM of any given five numbers?

Just write a method or function that calculates the LCM for two numbers at a time. Then calculate the LCM for the first two numbers, get the LCM of the result with the third number, etc.Just write a method or function that calculates the LCM for two numbers at a time. Then calculate the LCM for the first two numbers, get the LCM of the result with the third number, etc.Just write a method or function that calculates the LCM for two numbers at a time. Then calculate the LCM for the first two numbers, get the LCM of the result with the third number, etc.Just write a method or function that calculates the LCM for two numbers at a time. Then calculate the LCM for the first two numbers, get the LCM of the result with the third number, etc.

Related Questions

What are the first 85 Fibonacci numbers?

The first 85 Fibonacci numbers are:011235813213455891442333776109871,5972,5844,1816,76510,94617,71128,65746,36875,025121,393196,418317,811514,229832,0401,346,2692,178,3093,524,5785,702,8879,227,46514,930,35224,157,81739,088,16963,245,986102,334,155165,580,141267,914,296433,494,437701,408,7331,134,903,1701,836,311,9032,971,215,0734,807,526,9767,778,742,04912,586,269,02520,365,011,07432,951,280,09953,316,291,17386,267,571,272139,583,862,445225,851,433,717365,435,296,162591,286,729,879956,722,026,0411,548,008,755,9202,504,730,781,9614,052,739,537,8816,557,470,319,84210,610,209,857,72317,167,680,177,56527,777,890,035,28844,945,570,212,85372,723,460,248,141117,669,030,460,994190,392,490,709,135308,061,521,170,129498,454,011,879,264806,515,533,049,3931,304,969,544,928,6572,111,485,077,978,0503,416,454,622,906,7075,527,939,700,884,7578,944,394,323,791,46414,472,334,024,676,22123,416,728,348,467,68537,889,062,373,143,90661,305,790,721,611,59199,194,853,094,755,497160,500,643,816,367,088


Is 13 a Fibonacci number?

the first seven Fibonacci numbers are 1,1,2,3,5,8,13. 13 is a Fibonacci number.


When did Leonardo Fibonacci discovered the Fibonacci numbers?

Leonardo Fibonacci first recorded his sequence in his book Liber Abaci, which was published in 1202.


What are the first 3 numbers of the Fibonacci numbers sequence?

1, 1 and 2


What is one way to decide if two numbers follow a Fibonacci sequence?

They will always follow some Fibonacci sequence. If P and Q are any two numbers, then they belong to the Fibonacci sequence with the first two numbers as P and (Q-P).


What are the 11 Fibonacci numbers?

The first 11 Fibonacci numbers are 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, and 55.


Did Fibonacci discover the Fibonacci numbers?

He was not the first to discover it. Fibonacci lived around 1200 AD. He might have discovered it independently but it was known in India from 200 BC.


Write a java script program to print first ten odd natural numbers in C?

Q.1 Write a program to print first ten odd natural numbers. Q.2 Write a program to input a number. Print their table. Q.3 Write a function to print a factorial value.


What are the first three numbers in the Fibonacci sequence?

1, 1 and 2


How many of the first 30 numbers of the Fibonacci sequence are odd?

20 of them.


How do you write a C plus plus program that will display the first 10 positive prime numbers?

By learning how to program on C+.


Where did the Fibonacci Numbers first appear?

Fibonacci numbers have always been around. Many scholars believe the concept was first noticed by mathematicians of India. Leonardo of Pisa (known as Fibonacci) first introduced the sequence to Western European mathematics in a 1202 book entitled LiberAbici, thus the sequence bears his name.