A runner enters a distance in km and a time in minutes and seconds. Design the algorithm first (input → steps → output), then write RunPace:
INPUT km, minutes, seconds
totalSeconds ← minutes × 60 + seconds
paceSeconds ← whole part of totalSeconds / km
speed ← km / (totalSeconds / 3600)
OUTPUT distance, time, pace as "min s per km", speed
For the input
10 52 30
the program prints
Distance: 10.00 km
Time: 3150 seconds
Pace: 5 min 15 s per km
Speed: 11.4 km/h