Recursive Fibonacci

Reply

Join Date: Apr 2007
Posts: 1
Reputation: andrisetia is an unknown quantity at this point 
Solved Threads: 0
andrisetia andrisetia is offline Offline
Newbie Poster

Re: C++ programming Home Work HELP...(Fibonnaci)

 
0
  #1
Apr 18th, 2007
hi there, i also have an emergency home work

it about Fibonnaci recursive

the Output is should be like this :
--------------------------------------------------
First number of the fibonnaci : 3

The Fibonacci Lines are : 3 4 7 11 18 29 ...
----------------------------------------------------

i want the result is until 10 lines

i try all i do to finish this task, but always failed.

can anyone help me?
Reply With Quote Quick reply to this message  
Join Date: Apr 2007
Posts: 103
Reputation: mariocatch is an unknown quantity at this point 
Solved Threads: 17
mariocatch mariocatch is offline Offline
Junior Poster

Re: C++ programming Home Work HELP...(Fibonnaci)

 
0
  #2
Apr 18th, 2007
make a new post and don't hijack another person's thread... read the forum rules. also before you post that question, you need to make an attempt at completing it first.
Reply With Quote Quick reply to this message  
Join Date: Apr 2007
Posts: 7
Reputation: srinath.sec is an unknown quantity at this point 
Solved Threads: 0
srinath.sec srinath.sec is offline Offline
Newbie Poster

Re: C++ programming Home Work HELP...(Fibonnaci)

 
0
  #3
Apr 19th, 2007
use
fibonaci(int n)
{
if(n==1) return o;
if(n==2) return 1;
return fibonaci(n-1)+fibonaci(n-2);
}
Reply With Quote Quick reply to this message  
Join Date: Apr 2006
Posts: 5,051
Reputation: John A is a splendid one to behold John A is a splendid one to behold John A is a splendid one to behold John A is a splendid one to behold John A is a splendid one to behold John A is a splendid one to behold John A is a splendid one to behold John A is a splendid one to behold 
Solved Threads: 332
Team Colleague
John A's Avatar
John A John A is offline Offline
Vampirical Lurker

Re: C++ programming Home Work HELP...(Fibonnaci)

 
0
  #4
Apr 19th, 2007
Originally Posted by srinath.sec View Post
use
fibonaci(int n)
{
if(n==1) return o;
if(n==2) return 1;
return fibonaci(n-1)+fibonaci(n-2);
}
I think you need to read these:

http://www.daniweb.com/techtalkforum...cement8-2.html
http://www.daniweb.com/techtalkforum...cement8-3.html

Not only that, but I know for a fact that the code won't work.
"Technological progress is like an axe in the hands of a pathological criminal."
Reply With Quote Quick reply to this message  
Join Date: Mar 2007
Posts: 55
Reputation: addicted is an unknown quantity at this point 
Solved Threads: 0
addicted's Avatar
addicted addicted is offline Offline
Junior Poster in Training

Re: Recursive Fibonacci

 
0
  #5
Apr 19th, 2007
hey,
i will like you to post the code you have written so that i can help with it... i have written it and it worked but i want to make sure you know it and not just copy mine... i will tell you where the mistakes are and where you should make ammendments.....
trust me
00110101
Reply With Quote Quick reply to this message  
Join Date: Oct 2009
Posts: 1
Reputation: vannthns is an unknown quantity at this point 
Solved Threads: 0
vannthns vannthns is offline Offline
Newbie Poster
 
0
  #6
30 Days Ago
how to show this ?

Input number [1-40]: 3
3 first fibonacci : 1 1 2

i have no idea 'bout that...
Reply With Quote Quick reply to this message  
Reply

Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC