Hi,
I was hoping someone could shed some light on this for me. I am stuck on an assignment. I have spent 3 weeks on it and have almost finished it. I have so much going through my head at the moment I just need some help. Please. I do not expect you to do it all for me!! I have got this far on my own, I just need a little advice and a little help, as I really dont understand it and am having alot of trouble getting my head around it.
This is what the example looks like when it is finished (the parts in bold are what I need to work out). (the other parts I have done seem to work out ok).
Program computes the first n Fibonacci numbers and ratios of
consecutive ones. Enter n: 11
~~~~~~~~~~~~~~~~~~~~~~~~
Fibonacci
number Ratio
~~~~~~~~~~~~~~~~~~~~~~~~
1
1 1.000000000000
2 0.500000000000
3 0.666666666667
5 0.600000000000
8 0.625000000000
13 0.615384615385
21 0.619047619048
34 0.617647058824
55 0.618181818182
89 0.617977528090
~~~~~~~~~~~~~~~~~~~~~~~~
My main problems are that I cannot work out how to display them on the same line as well as do not know a formula of how to work out the ratio. I have used a for loop for the fibonacci numbers and it is ok. But I am really stuck on the ratio and displaying it.
Again, any help would be appreciated. Thank you.