How many cups to break even?
A coffee cart owner in Medellin pays a fixed monthly cost (permit, cart rental, insurance). Every cup sold has a selling price and a variable cost (beans, milk, cup). She wants to know the smallest whole number of cups she must sell in a month so that total revenue covers all costs.
Task: read three integers, one per line: the fixed monthly cost, the price per cup and the variable cost per cup. Print Break-even units: N, revenue: R where N is the smallest whole number of cups with profit of zero or more, and R is N times the price. If no number of cups can ever reach break-even, print NEVER. If the fixed cost is 0, N is 0.
Sample tests
Input
12000 150 90
Expected output
Break-even units: 200, revenue: 30000
Input
5000 49 30
Expected output
Break-even units: 264, revenue: 12936
Your answer is also checked against 4 hidden tests.
Log in or create a free account to run your code, submit and earn points.
Run your code to see the output here. Ctrl + Enter also runs it.
