nothing too difficult. if someones familiar with pseudo coding, just wondering if i did this assignment correctly.
these are the problems:
Code:
// This pseudocode segment is intended to describe
// computing then displaying your average score of
// two classroom tests.
start
input midtermGrade
input finalGrade
midtermGrade + final = totalPoints
average = final / 3
output totalPoints
stop
Code:
Develop the logic of a program that allows the user to enter two
values. The program should then compute and display the sum
of the two values. The program should then compute and display
the difference of the two values.
Pseudocode:
Code:
Develop the logic of a program that allows the user to enter:
(1) his or her hourly pay rate
(2) the number of hours he or she worked
(3) the percentage of gross salary to be withheld
The program should multiply the hourly pay rate by the number of
hours worked, giving the gross pay. Then, it should multiply the
gross pay by the withholding percentage, giving the withholding
amount. Finally, it should subtract the withholding amount from the
gross pay, giving the net pay.
The program should then display the net pay.
Pseudocode:
this is what i did.
Code:
// This pseudocode segment is intended to describe
// computing then displaying your average score of
// two classroom tests.
start
input midtermGrade
input finalGrade
set totalPoints = midtermGrade + final
set average = totalPoints / 2
output average
stop
--------------------------------------------------------------
start
input numberOne
input numberTwo
set sum = numberOne + numberTwo
output sum
set difference = numberOne - numberTwo
output difference
end
---------------------------------------------------------------
start
input rate
input hour
input grossPercentage
set grossPay = rate * hour
set heldAmount = grossPay * grossPercentage
set netPay = grossPay - heldAmount
output netPay
end