answersLogoWhite

0


Best Answer

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.

User Avatar

Wiki User

8y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How do you write the code for generating Fibonacci search in C programming?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

Write a function to code the Fibonacci series in LISP programming language?

(defun fibo (n) (if (< n 2) n (return (+ (fibo (- n 1)) (fibo (- n 2))))))


How is event driven programming different from other programming?

write a note on event driven programming


How do i Write a programme to show the fabonasi numbers?

Step 1. Learn the word "Fibonacci"...


Write a program to print the Fibonacci series in php upto input value using recursive function?

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 script use the following: function fibonacci($n) { if($n 1) return 1; //F1 else return fibonacci($n - 1) + fibonacci($n - 2); //Fn } This recursive function will print out the Fibonacci number for the integer n. To make it print out all the numbers in a particular set add this to your script. for($i = 0; $i < 15; $i++) { echo fibonacci($i) . "<br />"; } So your final result would look like. <?php function fibonacci($n) { if($n 1) return 1; else return fibonacci($n - 1) + fibonacci($n - 2); } for($i = 0; $i < 15; $i++) { echo fibonacci($i) . "<br />"; } ?>


Is a programming software the same as programming tool?

To use an analogy, a programming language is similar to any natural language such as English. We use the language to construct expressions which can be combined to form statements, just as we use English to construct expressions which can be combined to form sentences. Programming tools are simply tools that help us to write code, in much the same way that word processors help us to write letters. In programming, the main tools we use are code editors, compilers and debuggers. But just as a spell-checker won't help us write better poetry, programming tools won't help us write better programs. For that we must understand the language itself.

Related questions

Write a function to code the Fibonacci series in LISP programming language?

(defun fibo (n) (if (< n 2) n (return (+ (fibo (- n 1)) (fibo (- n 2))))))


How do i write code for search case sensitive in HTML?

A search cannot be created in HTML code alone. It actually requires use of other programming languages, such as JavaScript or PHP, etc.


How is event driven programming different from other programming?

write a note on event driven programming


How do i Write a programme to show the fabonasi numbers?

Step 1. Learn the word "Fibonacci"...


How programming language is useful in system programming?

Without programming languages you couldn't write (system) programs.


How do you write an acrostic poem for the word Fibonacci?

Fibonacci's first name was leonardoItaly was were he was bornBorn in ....O,1,1,2,3,5,8,13...Natually a geniusA simple person who became famousConsidered to be the best mathmatitionCreator of the Fibonacci sequenceI....{think for your self lazy}by Donhead pupil in year 6


Write a c program Fibonacci series using for loop in java?

Exactly what do you mean by 'C program in Java'


Write a program to print the Fibonacci series in php upto input value using recursive function?

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 script use the following: function fibonacci($n) { if($n 1) return 1; //F1 else return fibonacci($n - 1) + fibonacci($n - 2); //Fn } This recursive function will print out the Fibonacci number for the integer n. To make it print out all the numbers in a particular set add this to your script. for($i = 0; $i < 15; $i++) { echo fibonacci($i) . "<br />"; } So your final result would look like. <?php function fibonacci($n) { if($n 1) return 1; else return fibonacci($n - 1) + fibonacci($n - 2); } for($i = 0; $i < 15; $i++) { echo fibonacci($i) . "<br />"; } ?>


Write a c programming to solve a Fibonacci sequence?

This code shows first 30 Fibonacci numbers:#include#includeusing std::cin;using std::cout;long next_Fibonacci();int main(){cout


What books did Fibonacci write?

Fibonacci, also known as Leonardo Pisano, was a member of the Bonacci family and wrote several books. The surviving books are Liber abaci (1202), Practica geometriae (1220), Flos (1225), and Liber quadratorum.


What can c programming do?

by using this we can write a coding for operating systems


How do you learn Java Programming?

you go to school to learn it or you can read books on your own particuarly at amazon just search java programing or google it One of the best ways to learn a new programming language is to write programs in it. Try rooting around in the Java Programming category on this site. Look for questions like "Write a program to...?" and see if you can figure out how to answer them. Sun (now Oracle) has a whole website dedicated to the online versions of print books about learning the various parts and techniques of Java, including a very good introduction to Java programming language.