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

Which number can be used to fill in the blanks to make both statements true? 144÷12=____ and 12 x ____ = 144
In southeast Asia the European traders _____ a) Began a thriving trade with the local inhabitants b) Pretty much did what they could to protect their own intere
En el verano me gusta beber _____. In the summer i like drink _____. pan- bread naranjas-oranges jamón-ham limonada- lemonade
A magnet contains a ____ numbers of magnetic domains
For the most part, genes contain the instructions to make A.) fats B.) carbohydrates C.) DNA D.) proteins
Which of the following equations represents the Pythagorean theorem?
On Friday, 537 people attended a play. On Saturday, 812 people attended the same play. About how many more people attended the play on Saturday than on Friday?
the sum of 4 times a number and 2 is 8
Which of the following are common process analysis texts you would find in a book store or library? Self-help Home improvement Biography Art Cookbooks
For each pair below, select the sample that contains the largest number of moles .