![]() |
|
|||||||
|
|
Thread Tools | Search this Thread | Rate Thread |
|
#1
|
|||
|
|||
Trying to format the output display for Fibonacci numberHeres what he's asking for and I quote " Your table must display 6 numbers per row and use a spacing of 10 for each number"
I cant seem to figure it out and my brain is fry'd from staring at it a little help would be awesome. CPP / C++ / C Code:
I know I could have used a for loop as well but i didn't. also you prob already see it can only display the first 40. Last edited by LuciWiz : 16-Feb-2009 at 09:17.
Reason: Please insert your C++ between [cpp] & ]/cpp] tags
|
|||
|
#2
|
|||
|
|||
Re: Trying to format the output display for Fibonacci number, I've tried everything.First I must ask about:
CPP / C++ / C Code:
Code:
CPP / C++ / C Code:
- Use a second: counter2 = 0; - Inside your do-while loop: increment counter2 AND put an if( counter2 == 6 ) . - If the if() returns true: print a newline and reset counter2 to 0 for next line. |
|
#3
|
|||
|
|||
Re: Trying to format the output display for Fibonacci numberI was gonna mention that part too.
CPP / C++ / C Code:
|
|
#4
|
|||
|
|||
Re: Trying to format the output display for Fibonacci numberActually there is no need for a
CPP / C++ / C Code:
Instead, CPP / C++ / C Code:
|
Recent GIDBlog
Accepted for Ph.D. program by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| A program that calculates the number of characters in the text file | et21zero | Java Forum | 5 | 28-Apr-2008 13:04 |
| need help with a console menu system | BullBuchanan | C++ Forum | 6 | 20-Aug-2006 15:46 |
| Converting a number amount to text | Godzilla | C++ Forum | 5 | 31-Mar-2006 12:38 |
| Anyone can write a program code for this??? | chriskan76 | C Programming Language | 1 | 19-Oct-2004 21:25 |
| Apache2 config issues | monev | Apache Web Server Forum | 2 | 28-Jun-2004 07:19 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The