![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#11 |
|
Hobbyist Programmer
Join Date: Mar 2005
Posts: 148
Rep Power: 4
![]() |
That sure is weird how when I do it the original way using quotation marks to put spaces between the digits that the last two numbers(64 and 125) under the Cube column just don't print right. If anyone can explain the reason for this I'd like to know.
|
|
|
|
|
|
#12 |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
Check the docs for the default padding/formatting.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code. Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers |
|
|
|
|
|
#13 |
|
Hobbyist Programmer
Join Date: Mar 2005
Posts: 148
Rep Power: 4
![]() |
Man there is millions and millions and millions of stuff that I see. You would need to whittle it down quite a bit.
|
|
|
|
|
|
#14 |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
Well, in the first place, a duplicate of your code, running in NetBeans, does not produce what you show in your post. It produces this:
Value Square Cube 1 1 1 2 4 8 3 9 27 4 16 64 5 25 125 ![]() It produces the same thing if run from the command line: ![]() Now, if you look at that, you'll see that there are two spaces before the first column, 9 spaces between the first and second columns, and 10 spaces between the second and third columns. That's what your software is asking for, that's what you're getting. You've asked someone to explain a phenomenon that isn't occurring. GIGO.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code. Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers |
|
|
|
|
|
#15 |
|
Hobbyist Programmer
Join Date: Mar 2005
Posts: 148
Rep Power: 4
![]() |
I think I get it now. I wonder what GIGO means.
|
|
|
|
|
|
#16 | |
|
Caffeinated Neural Net
Join Date: Jun 2005
Location: Dry west coast of Canada
Posts: 925
Rep Power: 4
![]() |
Quote:
__________________
A man's knowledge is like an expanding sphere, the surface corresponding to the boundary between the known and the unknown. As the sphere grows, so does its surface; the more a man learns, the more he realizes how much he does not know. Hence, the most ignorant man thinks he knows it all. - L. Sprague de Camp |
|
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| advanced user output | l2u | C++ | 6 | May 9th, 2007 8:16 PM |
| Implementation of CRC32 | grimpirate | Other Web Development Languages | 2 | Mar 3rd, 2007 2:13 PM |
| Change the name of output file | jazz | C | 4 | Jun 28th, 2006 2:54 AM |
| Numerical data output to a file | can342man | C++ | 4 | Jan 27th, 2006 4:21 PM |
| It's giving me "Press any key to continue" and no other output.. | Insomniac | C | 15 | Jun 5th, 2005 7:07 AM |