Question: Once upon a time there was a land - a land of milk and honey, inhabited by happy and prosperous people. The people paid taxes,
Once upon a time there was a land a land of milk and honey, inhabited by happy and prosperous people. The people paid taxes, of course their happiness had limits The most important tax, called the Personal Income Tax PIT for short had to be paid once a year, and was evaluated using the following rule:
if the citizen's income was not higher than thalers, the tax was equal to of the income minus thalers and cents this was the socalled tax relief
if the income was higher than this amount, the tax was equal to thalers and cents, plus of the surplus over thalers.
Your task is to write a tax calculator.
It should accept one floatingpoint value: the income.
Next, it should print the calculated tax, rounded to full thalers. There's a function named round which will do the rounding for you you'll find it in the skeleton code in the editor.
Note: this happy country never returns money to its citizens. If the calculated tax is less than zero, it only means no tax at all the tax is equal to zero Take this into consideration during your calculations.
Look at the code in the editor it only reads one input value and outputs a result, so you need to complete it with some smart calculations.
Test your code using the data we've provided.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
