Explore BrainMass

# Pseudocode Problem

Not what you're looking for? Search our solutions OR ask your own Custom question.

This content was COPIED from BrainMass.com - View the original, and get the already-completed solution here!

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."

This content was COPIED from BrainMass.com - View the original, and get the already-completed solution here!