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

Write a paragraph of where i normally go on holiday>?
a patio is shaped like a golden rectangle. it's length ( the longer side) is 16ft. what is the patios width? write your answer in simplified radical form.
I want a fairy tale, history or an autobiography written in Spanish and containing the present tense, past tense, past tense and future tense..I just need a sma
what happens when something goes wrong with transcription and translation
for plants light temperature, touch, and gravity are all forms of what?
Which of the following did NOT contribute to the Great Depression? (A) buying stocks on margin (B) consumer installment buying (C) underconsumption of goods (D)
What was the experiment carried out by Hershel & Ritter.
a patio is shaped like a golden rectangle. it's length ( the longer side) is 16ft. what is the patios width? write your answer in simplified radical form.
what is 13,100+2600 in scientific notation?
jackson had 250 total goals in his professional soccer career. 115 of them were made at home games. what percent of his total goals were made during away games?