program to print all Fibonacci numbers between two given numbers

Page 1 of 1

4 Replies - 7455 Views - Last Post: 26 May 2009 - 12:55 PMRate Topic: //<![CDATA[ rating = new ipb.rating( 'topic_rate_', { url: 'https://www.dreamincode.net/forums/index.php?app=forums&module=ajax&section=topics&do=rateTopic&t=107064&amp;s=e4b1c2ab7b6d0fe82ad2509946e017a2&md5check=' + ipb.vars['secure_hash'], cur_rating: 0, rated: 0, allow_rate: 0, multi_rate: 1, show_rate_text: true } ); //]]>

#1 khranshu

Reputation: 0
• Posts: 1
• Joined: 26-May 09

program to print all Fibonacci numbers between two given numbers

Posted 26 May 2009 - 10:05 AM

program to print all Fibonacci numbers between two given numbers
Is This A Good Question/Topic? 0

Replies To: program to print all Fibonacci numbers between two given numbers

• Saucy!

Reputation: 6246
• Posts: 24,014
• Joined: 23-August 08

Re: program to print all Fibonacci numbers between two given numbers

Posted 26 May 2009 - 10:10 AM

There are 17 gazillion snippets here about Fibonacci numbers. Knock yourself out.

#3 IngeniousHax

• |>|20-514<|{3|2

Reputation: 84
• Posts: 1,385
• Joined: 28-March 09

Re: program to print all Fibonacci numbers between two given numbers

Posted 26 May 2009 - 11:02 AM

Indeed, there is most definitely a bagillion*10 amount of fibonacci programs on here. It's not too hard once you have the information you need.

#4 computerfox

• straight vegetarian kid

Reputation: 50
• Posts: 3,772
• Joined: 29-January 09

Re: program to print all Fibonacci numbers between two given numbers

Posted 26 May 2009 - 12:26 PM

```void youAnswer(){
while(0==0){
cout<<"\nI'm sorry, but we don't do your work for you here...\n";
cout<<"\nWe only help with code presented...\n";
cout<<"\nThank you...\n";
}
return;
}

```

A+ worthy code

This post has been edited by computerfox: 26 May 2009 - 12:27 PM

#5 IngeniousHax

• |>|20-514<|{3|2

Reputation: 84
• Posts: 1,385
• Joined: 28-March 09

Re: program to print all Fibonacci numbers between two given numbers

Posted 26 May 2009 - 12:55 PM

```#include <iostream>
#include <cmath>

void fibonacci();
using namespace std;

int main() {
double x;
double y;
cout << "Enter the two numbers to have the sequence calculated from and to" << endl;
cin >> x >> y;
fibonacci();
return 0;
}

void fibonacci() {
/**************************************************************************
All your code should go here if you want to use a function
Also, I have basically laid out the simplest part of the program
now all you have to do is figure out the formula and how
to implement the user numbers into your function
of the fibonacci sequence
**************************************************************************/
}

```

This post has been edited by IngeniousHax: 26 May 2009 - 12:57 PM