Java Program- Help Needed
How do I write this code?
You will ask the user for 2 inputs, the total number of chocolate, and the amount of chocolate that goes into the making of the large bar. You must be able to accept decimal point values for both. The small bar value is fixed at 0.5.
To solve this program, we want you to use loops. This is very important. This assignment is further practice using loops.
Here is the calculations we want you to do:
Calculate the number of large bars that can be made from the total amount of chocolate
From the remainder, calculate how many small bars can be created.
We do not want partial bars. So if there is chocolate left over, it can be discarded.
Once you have completed your calculations, you will print out the number of large and small bars that can be made. Please use the formula "From the chocolate given, you get (your # of large bars here) large bars, and (your # of small bars here) small bars."