Computer Science, asked by kayaldipannita2, 19 days ago

write a program in java to accept the time in minutes. Convert it to hours and minutes and display it.​

Answers

Answered by IIGoLDGrAcEII
0

Answer:

\huge \mathcal \colorbox{pink}{{ \color{yellow}{❀PêRfèCt ÀnsWër}}}

If you want to do this yourself, go the other way.

  1. Divide the number by 60 * 24. (That will get the number of days.)
  2. Divide the remainder by 60. (That will give you number of hours.)
  3. The remainder of #2 is the number of minutes.
Answered by FaberCastel
2

Answer:

import java.util.Scanner;

public class MathUnitConversions14 {

public static void main(String[] args) {

 long hours;

 Scanner in = new Scanner(System.in);

 System.out.println("Please enter hours:");

 hours = in.nextLong();

 long minutes = hours * 60;

 System.out.println(minutes + " Minutes");

}

}

_________________________________

I took a little help from the web. It worked for me.

Similar questions