question archive Problem statement: Albert, Bruce, and Charles each run twice to qualify

Problem statement: Albert, Bruce, and Charles each run twice to qualify

Subject:AnthropologyPrice: Bought3

Problem statement: Albert, Bruce, and Charles each run twice to qualify. The algorithm is incorrect and need to be modified. The algorithm should input the three runners' times, average them and decide who is the fastest, and output the answer.

 

Here is the pseudocode for an algorithm solving the problem:

  1. Output "Runner Times Program".
  2. Output "What was Albert's time?"
  3. Input Albert_time.
  4. Output "What was Bruce's time?"
  5. Input Bruce_time.
  6. Output "What was Charles's time?"
  7. Input Charles_time.
  8. Is Albert_time < Bruce_time? If no, go to Step 14.
  9. Is Albert time < Charles time? If yes, go to Step 12.
  10. Output "Charles was the fastest".
  11. Go to Step 18.
  12. Output "Albert was the fastest".
  13. Go to Step 18.
  14. Is Bruce_time <  Charles_time? If yes, go to Step 17.
  15. Output "Charles was the fastest".
  16. Go to Step 18.
  17. Output "Bruce was the fastest".
  18. End.

pur-new-sol

Purchase A New Answer

Custom new solution created by our subject matter experts

GET A QUOTE

Related Questions