![]() |
|
#1
|
|||
|
|||
Help with a simple program.i have to write a program that shows the first 24 numbers of the Fibonacci sequence of numbers. The Fibonacci sequence is 0, 1, 1, 2, 3, 5, 8, 13, 21,... or the next number is the sum of the previous two numbers. I have a program that works but instead of starting with 0 it starts with 1. Here is the code, any help would be greatly appreciated.
CPP / C++ / C Code:
|
|||
|
#2
|
|||
|
|||
|
Quote:
Well, you used m and k for the first two terms of your sequence. You didn't print them out. So you could simply do this: CPP / C++ / C Code:
Regards, Dave |
Recent GIDBlog
Problems with the Navy (Officers) by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| [TUTORIAL] Calling an external program in C (Linux) | dsmith | C Programming Language | 4 | 22-Apr-2005 13:30 |
| fltk-2.0 cvs | Plumb | FLTK Forum | 20 | 13-Nov-2004 07:10 |
| Anyone can write a program code for this??? | chriskan76 | C Programming Language | 1 | 19-Oct-2004 20:25 |
| Need help with a C program (Long) | McFury | C Programming Language | 3 | 29-Apr-2004 20:06 |
| How to write simple program like ........? | laputa9000 | C++ Forum | 3 | 29-Oct-2003 12:09 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The