Calculate the tax for a given income.
10% tax is paid for any income up to $2,000.
20% tax is paid for additional income up to $3,000.
30% tax is paid for any additional income over $3,000.
For example, the tax for an income of $2,500 is calculated as follows:
$2,000 * 10% + $500 * 20% = $300
Solution Stats
Problem Comments
Solution Comments
Show comments
Loading...
Problem Recent Solvers214
Suggested Problems
-
Extract leading non-zero digit
2244 Solvers
-
Return the first and last characters of a character array
11791 Solvers
-
Remove the two elements next to NaN value
702 Solvers
-
689 Solvers
-
1706 Solvers
More from this Author25
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!