Here is an output from my program:
What I don't know how to do is make it look as follows:Code:1 ? 2 ? ... 10 ? 11 ?
Code:01 ? 02 ? ... 10 ?
Here is an output from my program:
What I don't know how to do is make it look as follows:Code:1 ? 2 ? ... 10 ? 11 ?
Code:01 ? 02 ? ... 10 ?
try this:orCode:if(int<10) cout<<'0'; cout<<int;Code:cout<<(int<10?'0':" \b")<<int;
Join is in our Unofficial Cprog IRC channel
Server: irc.phoenixradio.org
Channel: #Tech
Team Cprog Folding@Home: Team #43476
Download it Here
Detailed Stats Here
More Detailed Stats
52 Members so far, are YOU a member?
Current team score: 1223226 (ranked 374 of 45152)
The CBoard team is doing better than 99.16% of the other teams
Top 5 Members: Xterria(518175), pianorain(118517), Bennet(64957), JaWiB(55610), alphaoide(44374)
Last Updated on: Wed, 30 Aug, 2006 @ 2:30 PM EDT
or, with iomanip:
cout << setw(maxwidth) << setfill('0') << int;
or
Code:printf("%02d ", i);
Definition: Politics -- Latin, from
poly meaning many and
tics meaning blood sucking parasites
-- Tom Smothers