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

find the volume of a sphere with the diameter of 4
How did Islam mainly spread throughout the region? A) by imperial command B) through military strength C) via trade D) because of religious decree
How did american indians help the patriots
Which condition causes ocean salinity to decrease? A. low levels of evaportation B. thawing of polar ice caps C. ocean water flowing into rivers D. low leve
how many times can 250ml be taken from 2.5l
Which term represents a type of nuclear reaction? a) condensation b)vaporization c)single replacement d)natural transmutation
special rules that control the way thing are done
there are 8 books on the shelf. 2 of the books are fiction. The rest are nonfiction. What fraction of the books are nonfiction?
Identify the vertex focus axis of symmetry directrix and direction of opening if each Y= 2(x-10) + 8
the interior paint color melon madness,is 30% yellow, I used 72 ounces of yellow paint to mix the last batch. How many ounces of melon madneess did I make in la