How do I use printf to format an integer to look something like: $100,300,300 instead of 100300300?
It's 2 AM and I have class tomorrow.. the sooner you can help the better.
Thanks a ton.
How do I use printf to format an integer to look something like: $100,300,300 instead of 100300300?
It's 2 AM and I have class tomorrow.. the sooner you can help the better.
Thanks a ton.
edit: float not integer
> URGENT (I need sleep)
You joined a message board just to announce that you need sleep?
What do you do if your house is on fire - take out full page ads in a national newspaper?
> It's 2 AM and I have class tomorrow
while ( !sunrise ) { /* snooze */ }
> How do I use printf to format an integer to look something like: $100,300,300 instead of 100300300?
Use /1000 and %1000 to extract each group of digits.
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.
> What do you do if your house is on fire - take out full page ads in a national newspaper?
Hahahah!!!
The world is waiting. I must leave you now.
>>> It's 2 AM and I have class tomorrow..
Little tip, start earlier.
Wave upon wave of demented avengers march cheerfully out of obscurity unto the dream.
I'm am posting this because it appears that you are posting a homework assignment or other project and you are asking for someone else to do all of the work.
Please don't ask people to do all your work for you, See the announcement on Homework at the top of the forum to see what is acceptable or PM me.
Basically people are happy to help, but they're not going to do it all for you.
Show us what you've got, show your code (using code tags), or where you're confused and someone will be happy to help you I'm sure. If it's something that you absolutely don't understand how it works, like you have no clue how qsort works, then ask a general question about the function and I'm sure someone will explain it. Though they may not give you all of the code for it, but someone will explain the concept.
On obivous homework questions especially, I also like to remind people of the board's tenth guildeline, while this board is very helpful to people, make sure you have your instructor's permission before seeking help on assignments. While people on these boards are more than happy to help, we discourage people from asking for help on graded work without the instructor's permission, and we claim no repsonsibilty for any cheating or honor violations.
Feel free to PM me with any questions.
Good Luck,
Kermi3
Lead Moderator