The shop compares products by price per unit so people cansee which is really cheaper. Bulk packs look cheap untilyou do the division. I want to give it a price and acount and get the per-unit figure back.Write your requirements list before you write any code. Input, calculate, output, and anything you had to decide for yourself.
if that compares two calls to your method — something a method that only prints could never do.:F2 does that, in the line that prints, not inside the method.int, the division would be Activity 1.6's integer division.Only one-star challenges have this section. If you already know how to begin, skip it — and when you move up to two stars, working out the order yourself is part of the job.
double price and an int count and returns the price per unit.:F2.if to print which pack is better.Pack of 12 at $8.40 -> $0.70 eachPack of 30 at $19.50 -> $0.65 eachThe 30-pack is better.Check the arithmetic by hand: 8.40 ÷ 12 and 19.50 ÷ 30 both come out to whole cents.
Your requirements list and your program file, named cc-unit-price.