about | help | code help+videos | done | prefs |
Define a function that when passed three floating-point values, the first representing distance between two locations, the second representing the average speed of one-way trip, and the third representing the required average speed of the entire return-trip, returns the speed at which you must return to achieve the expected overall average.
returnSpeed(60, 30, 40) → 60.0 returnSpeed(100, 80, 90) → 102.85714285714285 returnSpeed(12, 9, 5) → 3.4615384615384612 ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Difficulty: 3 Post-solution available
Copyright Nick Parlante 2017 - privacy