Month-over-Month Growth
Lantern's investor update leads with a single line about the month just finished against the month before it. Two raw revenue figures tell a reader skimming a dozen of these updates nothing, so the headline has to be a percentage — and it has to be signed, because a bad month is supposed to look bad.
Task: Print the percentage change from last month to this month.
Input
Two lines. The first holds last month's revenue, which is never zero. The second holds this month's. Either may be whole or decimal.
Output
One line: a percentage with exactly one digit after the decimal point. Last month is the baseline the change is measured against. A fall prints with a minus sign, and a month that came in level prints 0.0.
Example:
Input:
2000
2300
Output:
15.0
Sign in to solve this problem
Reading problems is free for everyone — solving them (Run, Submit, and tracking what you've solved) needs an account.
Sign in