Table (A): Income tax rates assessment year 2020 Chargeable Income (101) Calculation (RM) Rate % 'lax (101) 0 — 5,000 On the First 5,000 0 0 5,001 — 20,000 On the First 5,000 Next 15,000 0 150 20,001 — 35,000 On the First 20,000 Next 15,000 150 450 35,001 — 50,000 On the First 35,000 Next 15,000 8 600 1,200 Write a complete C program to prompt the user to enter the total chargeable income (RM), and then calculate the tax based on the calculation given in Table (A). Requirements: - Apply one return value function, include parameter list if necessary - Apply one non-return value function, include parameter list if necessary - If user enter chargeable income that is out of range (refer to Table (A)), display an error message and ask user to re-enter the chargeable income. - Repeat the program for 3 times.
Table (A): Income tax rates assessment year 2020
Chargeable Income (101) |
Calculation (RM) |
Rate % |
'lax (101) |
0 — 5,000 |
On the First 5,000 |
0 |
0 |
5,001 — 20,000 |
On the First 5,000 |
|
0 |
20,001 — 35,000 |
On the First 20,000 |
|
150 |
35,001 — 50,000 |
On the First 35,000 |
8 |
600 |
Write a complete C program to prompt the user to enter the total chargeable income (RM), and then calculate the tax based on the calculation given in Table (A).
Requirements:
- Apply one return value function, include parameter list if necessary
- Apply one non-return value function, include parameter list if necessary
- If user enter chargeable income that is out of range (refer to Table (A)), display an error message and ask user to re-enter the chargeable income.
- Repeat the program for 3 times.
Step by step
Solved in 4 steps with 2 images