Skip to Main Content

New to Java

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Beginner Java: Using the Remainder Operator

843789Jul 17 2010 — edited Jul 28 2010
Hi everyone, i just started Java, and I have an assignment to do which I have completed, except for one part that I'm hoping to get help with. the assignment is basically to keep track of this fictional character's money as he goes through his daily activities of one week.

The part where I need help is at the end of the week, I have to output the character's money in exact change using the remainder (%) operator. Example: $7.27 would be a five, a toonie, a quarter, and two pennies. There was some mention of a loop within a loop, and I can't figure this out for the life of me.

Help please? D:
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 25 2010
Added on Jul 17 2010
35 comments
713 views