Answer to Question #265445 in Algorithms for Adrohs

Question #265445



Write an algorithm that calculates the net pay of an employee based on the formula as shown in Equation (1). Based on the algorithm, draw the flowchart as well. The taxes are calculated as following;



• If GrossPay is less than 5000, then taxes are zero



• If GrossPay is at least 5000, but less than 10,000 then taxes are 2% of the GrossPay



• If GrossPay is 10,000 or more, then taxes are 4% of the GrossPay



NetP ay = GrossP ay − T axes

1
Expert's answer
2021-11-13T10:47:08-0500

input:

g \\ GrossPay

t \\ Taxes

n \\ NetPay


case (g < 5000): t = 0

case (5000 <= g < 10000): t = 0.2*g

case (g => 10000): t = 0.4*g


output:

n = g - t






Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS