Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package timeconversion;
- import java.util.Scanner;
- public class TimeConversion {
- public static void main(String[] args) {
- Scanner input = new Scanner(System.in);
- int minutes,hours1,hours2 = 0;
- System.out.print("Please enter a time in minutes:");
- minutes = input.nextInt();
- hours1 = minutes/60;
- hours2 = minutes%60;
- System.out.print("Your time in hours was "+hours1);
- System.out.print(":"+hours2);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement