Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package ex9;
- import java.util.Scanner;
- /**
- *
- * @author Monty
- */
- public class Ex9 {
- /**
- * @param args the command line arguments
- */
- public static void main(String[] args) {
- int inputmin;
- int hour;
- int minutes;
- Scanner input = new Scanner(System.in);
- System.out.print("Enter the time in minutes: ");
- inputmin = input.nextInt();
- hour = inputmin / 60;
- minutes = inputmin % 60;
- System.out.print("The time is: " + hour + ":" + minutes);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment