Explore BrainMass
Share

Explore BrainMass

    Pseudocode Problem

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

    © BrainMass Inc. brainmass.com October 10, 2019, 6:47 am ad1c9bdddf
    https://brainmass.com/computer-science/pseudocode/pseudocode-problem-556820

    Solution Preview

    As you are resetting GRAVITY, therefore, do not use the term Constant. Also, it is ...

    Solution Summary

    Error in a small pseudo code is found and rectified in this solution.

    $2.19