Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

E 1 2 . In the United States of Pretendistan, income is taxed as follows: if your income it at most $ 2 0 ,

E12. In the United States of Pretendistan, income is taxed as follows:
if your income it at most $20,000 per year, you pay 5% of your total income as tax
otherwise, you pay 8% of your total income as tax
Complete the function compute tax that uses an if-statement to compute and return the total tax due for the salary stored in the argument named salasy. Test your code on incomes of $10,000(return value should be $500) and $100,000(retum value should be $8,000).
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions