Answers for "minutes to hours"

0

minutes to hours

function timeConvert(n) {
var num = n;
var hours = (num / 60);
var rhours = Math.floor(hours);
var minutes = (hours - rhours) * 60;
var rminutes = Math.round(minutes);
return num + " minutes = " + rhours + " hour(s) and " + rminutes + " minute(s).";
}

console.log(timeConvert(200));
Posted by: Guest on August-13-2021

Code answers related to "minutes to hours"

Code answers related to "Javascript"

Browse Popular Code Answers by Language