Please help with this problem...
I'm still learning java and i got stuck with a problem posted through our school campus...
this is the one....and it's supposed to be the sequential structure..

Write a program that classifies a given amount of money in dollars. The program outputs a report listing the monetary equivalent in dollars, quarters, dimes, nickels, and pennies.
for an output example:

Enter an amount in dollars: $11.56
Your amount $11.56 consists of :
11 dollar(s)
2 quarter(s)
0 dime(s)
1 nickel(s)
1 penny(ies)

and so with the reverse process..
please help...

6 Years
Discussion Span
Last Post by hehe31

What problem(s) are you having?
Please post your code and the full text of the errors you are getting.


As always, the first step is to break it down into pieces that you can deal with. Break it into logical steps, save the coding for later. Assume that you're a computer, and have only simple arithmetical steps at hand. How would you go about calculating the correct output?
(hint: this problem really only requires two arithmetical operators)
(second hint: it's a LOT easier if you view $11.56 as 1156 cents, and use integer arithmetic)

Votes + Comments
Nice explanation.

can i ask the formulas for integer arithmetic??
it's because i'm still new to programming...

Edited by hehe31: n/a


lol..i just got it...
thanks jon.kiparsky...

Votes + Comments
Good work - that was a pretty minimal hint I gave you.
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.