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

What is the multiplied expression for 4^4• 4^4 over 4^5 ?
In the process shown in the diagram above, what is happening to the Earth’s freshwater supply? A. The amount is increasing. B. The amount is decreasing. C. The
How is specific gravity related to density??
What are some ways you can learn about people who lived long ago
nitrogen is an essential nutrition for plant growth but farmers who cultivate pulse grow crops like green gram Bengal gram exetra do not apply nitrogenous ferti
What is the main human activity that can contribute to climate change?
The body of water circled on the map above is called the __________. A. Strait of Hormuz B. Suez Canal C. Panama Canal D. Tigris River
Which of these solutes raises the boiling point of water the most? A. molecular sucrose (C12H22O11) B. ionic sodium chloride (NaCl) C. ionic potassium bromid
Use complete sentences to explain the relationship between tan 5pi/4 and tan pi/4. In your answer, reference specific values on the unit circle to prove the re
Which base if found only in DNA A. Adenine B. Guanine C. Cytosine D. Thymine