|
-
October 13th, 2007, 12:49 PM
#1
A REALLY Dumb Question
Either I missed this class in Elementary Programming, or perhaps Mary-Jane had her see-through blouse on, but I'm at a loss for this: What format string would I use (eg., in a printf() call) to right-justify a number with blank fill?
For example, if the number is 12 and I have a 4-character field, I want to print " 12".
Regards
Robert Thompson
-
October 13th, 2007, 01:43 PM
#2
Re: A REALLY Dumb Question
Code:
int x = 12;
printf("%4d\n", x );
Kurt
-
October 13th, 2007, 03:18 PM
#3
Re: A REALLY Dumb Question
Told you it was a dumb question. I could swear that didn't work for me in the project, but you are absolutely right. Maybe I should stop thinking about Mary-Jane....
Regards
Robert Thompson
-
October 13th, 2007, 03:30 PM
#4
Re: A REALLY Dumb Question
i feel with you man, i cant stop thinking about this girl i know either ... and i need the guts to tell her how i feel about her
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|