A ship sails in a straight line and sends a SONAR pulse every kilometre. You will make the program turn each echo time into a depth, find the deepest point, and find where a hidden hill is shallowest. Then it draws the sea floor.
The idea. The pulse goes down and back up, so the depth is , with in sea water.
Your tasks.
d, the depth below each point, in metres.deepest, the greatest depth, in metres.top_km, the kilometre mark where the sea is shallowest (the top of the hill).Have you tried it?
Do the tasks in the editor first, and run the checker after each one. Its hints help when a check fails. When you are ready, compare your code with this solution.
Log in to join the discussion.
Loading…