Exerpad
Exercise 7 · Chapter: Linear ProgramsRequired+50 XP

Minutes to Hours

Given totalMinutes = 135, compute the hours and remaining minutes.

Your output should be:

2 hours and 15 minutes

Hint: Use Math.floor() for integer division and % for remainder.

Need a hint?
3 available · costs 5 XP each
javascript
let totalMinutes = 135;

// Compute hours and remaining minutes, then print
Output
Run your code to see the output here.