Write a pseudocode to represent the logic of a program that allows a user to enter an hourly pay rate and hours worked. The program outputs the user's gross pay
4 answers
Design a class name house that holds the street address asking price number of bedrooms and number of bathrooms in a house includes methods to get and set the values for each data field
Pseudocode::
START
INPUT FLOAT hourlyPayRate
INPUT FLOAT hoursWorked
grossPay = hourlyPayRate*hoursWorked
OUTPUT grossPay
STOP
::
Modified Pseudocode::
START
INPUT FLOAT hourlyPayRate
INPUT FLOAT hoursWorked
INPUT taxRate
grossPay = hourlyPayRate*hoursWorked
netPay = grossPay*(100-taxRate/100)
OUTPUT netPay
STOP
::
N.B. I have used the data types Float, as it allows the user to enter decimal values, e.g. their hourly rate which may not be to the nearest value. Further, when calculating the net pay, I have simply multipled the gross pay by a tax multiplier (calculated by subtracting the tax rate from 100 - to find the remaining percentage - and dividing by 100 to get a decimal multiplier).
START
INPUT FLOAT hourlyPayRate
INPUT FLOAT hoursWorked
grossPay = hourlyPayRate*hoursWorked
OUTPUT grossPay
STOP
::
Modified Pseudocode::
START
INPUT FLOAT hourlyPayRate
INPUT FLOAT hoursWorked
INPUT taxRate
grossPay = hourlyPayRate*hoursWorked
netPay = grossPay*(100-taxRate/100)
OUTPUT netPay
STOP
::
N.B. I have used the data types Float, as it allows the user to enter decimal values, e.g. their hourly rate which may not be to the nearest value. Further, when calculating the net pay, I have simply multipled the gross pay by a tax multiplier (calculated by subtracting the tax rate from 100 - to find the remaining percentage - and dividing by 100 to get a decimal multiplier).
It's seems correct according to my understanding. Even though I don't really understand pseudo code
It seems correct according to my understanding even though I don't understand pseudo code