129k views
0 votes
A. Draw a flowchart or write pseudocode to represent the logic of a program that allows the user to enter an hourly pay rate and hours worked. The program outputs the user’s gross pay.

b. Modify the program that computes gross pay to allow the user to enter the withholding tax rate. The program outputs the net pay after taxes have been withheld

1 Answer

2 votes

Answer:

Here is the pseudocode.

a.

INPUT hourly rate

INPUT hours worked

SET gross pay = hourly rate x hours worked

PRINT gross pay

b.

INPUT hourly rate

INPUT hours worked

SET gross pay = hourly rate x hours worked

PRINT gross pay

INPUT tax rate

SET net pay = gross pay - (gross pay * tax rate / 100)

PRINT net pay

Step-by-step explanation:

a.

Ask the user to enter hourly rate and hours worked

Calculate the gross pay, multiply hourly rate by hours worked

Print the gross pay

b.

Ask the user to enter hourly rate and hours worked

Calculate the gross pay, multiply hourly rate by hours worked

Print the gross pay

Ask the user to enter the tax rate

Calculate the net pay as gross pay - (gross pay * tax rate / 100)

Print the net pay

User Norbeq
by
8.1k points