Pseudocode Problem
Not what you're looking for? Search our solutions OR ask your own Custom question.
There is an error in this pseudocode, can you help me find it?
Constant Real GRAVITY = 9.81
Display "Rates of acceleration of an object in free fall:"
Display "Earth: ", GRAVITY, " meters per second every second."
Set GRAVITY = 1.63 Display "Moon: ", GRAVITY, " meters per second every second."
https://brainmass.com/computer-science/pseudocode/pseudocode-problem-556820
SOLUTION This solution is FREE courtesy of BrainMass!
As you are resetting GRAVITY, therefore, do not use the term Constant. Also, it is acceleration, not rates of acceleration.
Code should be as follows:
Variable Real GRAVITY = 9.81
Display "Acceleration of an object in free fall:"
Display "Earth: ", GRAVITY, " meters per second every second."
Set GRAVITY = 1.63
Display "Moon: ", GRAVITY, " meters per second every second."
https://brainmass.com/computer-science/pseudocode/pseudocode-problem-556820