LeviGu
LeviGu LeviGu
  • 20-11-2020
  • Computers and Technology
contestada

How would you code 135 minutes and turn it into 2 hours and 15 minutes, using integer/modular division, in Javascript?

135 to 2h15

Respuesta :

Cytokine
Cytokine Cytokine
  • 20-11-2020

mins = 135;

alert("There are "+(Math.floor(mins/60))+" hour(s) and "+(mins%60)+" min(s).");

That's how I would do it. I hope this helps!

Answer Link

Otras preguntas

numbers 20 - 22 please
what should i know about pride and prejudice?
2700=2300(1+r)^5 solve for r Please show all work
which word is the linking verb when I taste something spicy, I fell uncomfortable
what is a pro-sentence?
The width of a rectangle is 4 less than half the length. If represents the length, which equation could be used to find the width, w?
5 sentences about outdoor recreation that will help me revise for a test
what is an appositive?
4y-12x+8=0; Solve for y
for a circle of radius 4 with center (-4, 3). in general form