Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Scanner scanner = new Scanner(System.in);
- int hours = Integer.parseInt(scanner.nextLine());
- int minutes = Integer.parseInt(scanner.nextLine());
- if(minutes <= 44) {
- minutes = minutes + 15;
- System.out.printf( " %d:%d" , hours , minutes ) ;
- }
- else {
- hours = hours + 1 ;
- minutes = 15 - (60 - minutes );
- System.out.printf( "%d:%d" , hours , minutes) ;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement