package timeConversion;
import java.util.Scanner;
public class TimeConversion {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
System.out.println("Please enter the time in minutes: ");
int time = input.nextInt();//time in minutes
int hour = time / 60;// hour
int minute = time % 60; //minutes
System.out.print("The time is: " + hour + ":" + minute);
}
}
So I'm having trouble with values in the minute spot being less than 10. for example, when you time in 184 minutes, the output is 3:4, but i would like it to read 3:04. how could I go about doing this ?