Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Shavit Borisov
- // CW
- import java.util.Scanner;
- public class Time {
- public static void main(String[] args)
- {
- Scanner in = new Scanner (System.in);
- int num, hours, minutes;
- System.out.println("Enter a value for the minutes: ");
- num = in.nextInt();
- hours = num / 60;
- minutes = num % 60;
- System.out.println("The time you entered is " + hours + ":" + minutes);
- in.close();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment