PROGRAMMING QUESTION (20 MARKS) Question 1 (12m) Table (A) shows the individual income tax rates for assessment year 2020. Table (A): Income tax rates assessment year 2020 Chargeable Income (RM) 0- 5,000 Calculation (RM) On the First 5,000 On the First 5,000 Next 15,000 On the First 20,000 Next 15,000 On the First 35,000 Next 15,000 Rate % Таx (RM) 5,001 – 20,000 1 150 150 450 600 1,200 20,001 – 35,000 3 35,001 – 50,000 8 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). For example: Prem's chargeable income = RM30,000 (RM20,000 + RM10,000) Total tax = RM150 (for first RM20,000) + RM300 (3% x RM10,000) = RM450 The program will then display the result which is the total amount tax needed to be paid in Ringgit Malaysia (RM), up to three significant digits after the decimal point. 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.
Operations
In mathematics and computer science, an operation is an event that is carried out to satisfy a given task. Basic operations of a computer system are input, processing, output, storage, and control.
Basic Operators
An operator is a symbol that indicates an operation to be performed. We are familiar with operators in mathematics; operators used in computer programming are—in many ways—similar to mathematical operators.
Division Operator
We all learnt about division—and the division operator—in school. You probably know of both these symbols as representing division:
Modulus Operator
Modulus can be represented either as (mod or modulo) in computing operation. Modulus comes under arithmetic operations. Any number or variable which produces absolute value is modulus functionality. Magnitude of any function is totally changed by modulo operator as it changes even negative value to positive.
Operators
In the realm of programming, operators refer to the symbols that perform some function. They are tasked with instructing the compiler on the type of action that needs to be performed on the values passed as operands. Operators can be used in mathematical formulas and equations. In programming languages like Python, C, and Java, a variety of operators are defined.
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).
Below Image :
![99 (121) WhatsAp X
MIDTERM TEST X
(12) Techlacart X
Write a comple X
Table (A) Show X
FREE Chegg Ar X
Ayzha Nyr u
often lyrics - G X
classroom.google.com/u/1/c/M TcyMjAyOTMxNzY4/a/MJU5NDM3NJE10TAY/details
Apps
New Tab
Bookmarks
Bayyinah TV
Netflix
YouTube
AK AnimeKisa
Discord
Gmail
29
Calendar
Classroom
MMU PORTAL
MMLS
246
DCP5101 PROGRAM DESIGN
PROGRAMMING QUESTION (20 MARKS)
Tri 2 2020/2021
Question 1 (12m)
INFORMATION & II
Table (A) shows the individual income tax rates for assessment year 2020.
rk as Done
- 30 hours Test
Table (A): Income tax rates assessment year 2020
Start: 29/1/2021
- End: 30/1/2021,
- 2 Programming
- Paste codes/scre
in the Answer She
- Convert Answer S
- Fill up the Honest
Таx (RM)
Chargeable Income (RM)
0– 5,000
Calculation (RM)
On the First 5,000
On the First 5,000
Next 15,000
On the First 20,000
Next 15,000
On the First 35,000
Next 15,000
Rate %
hts
5,001 – 20,000
1
150
150
vate comment.
20,001 – 35,000
3
450
600
35,001 – 50,000
8
IMPORTANT:
1,200
- Marks will be ded
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).
- Should you are un
Answer Sheet blan
- Any act of plagia
For example:
Prem's chargeable income = RM30,000 (RM20,000+ RM10,000)
Total tax = RM150 (for first RM20,000) + RM300 (3% x RM10,000) = RM450
SUBMISSIONITEM
1) Source code (*
2) Answer Sheet (F
The program will then display the result which is the total amount tax needed to be paid in
Ringgit Malaysia (RM), up to three significant digits after the decimal point.
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.
10 class comm
RAZI B
miss i
Page
1 / 2
ATTENI
10:59 PM
DEV
e Type here to search
ENG
31
29/1/2021
...
+](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F54a6468f-c2e2-4b1f-a203-174046b083fe%2Feff84dfb-9b4a-492f-b82b-f9058447e68d%2Fyh3fsfk_processed.png&w=3840&q=75)
![](/static/compass_v2/shared-icons/check-mark.png)
Step by step
Solved in 2 steps with 1 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
![Fundamentals of Information Systems](https://www.bartleby.com/isbn_cover_images/9781305082168/9781305082168_smallCoverImage.gif)
![Fundamentals of Information Systems](https://www.bartleby.com/isbn_cover_images/9781305082168/9781305082168_smallCoverImage.gif)