Hello, I am making a program with Dr. Java 5.1. It is a time conversion program. It converts the time from minutes to hours:minutes. The only problem is, I have no idea how to do the equation. Here is my program so far:
import java.util.Scanner;
public class TimeCoversionArthurYanthar {
static Scanner sc = new Scanner (System.in);
public static void main (String [] args) {
//Integers
int mtime;
int htime;
int hour = 12;
int minute = 60;
System.out.println("Enter the time in minutes: ");
int entertime = sc.nextInt();
htime = entertime % hour;
mtime = (entertime - hour) * minute;
System.out.println("The time is: " + htime + ":" + mtime + "");
}
}
2007-10-09
00:08:44
·
4 answers
·
asked by
Anonymous
in
Computers & Internet
➔ Programming & Design