Asked by Sunshine
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
Answers
Answered by
Sunshine
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
Answered by
Adamissmart
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).
Answered by
Zethu
It's seems correct according to my understanding. Even though I don't really understand pseudo code
Answered by
Zethu
It seems correct according to my understanding even though I don't understand pseudo code
There are no AI answers yet. The ability to request AI answers is coming soon!
Submit Your Answer
We prioritize human answers over AI answers.
If you are human, and you can answer this question, please submit your answer.