Advertisement
-and_

Untitled

Apr 4th, 2020
27
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class ee {
  4. public static void main(String[] args) {
  5. Scanner scanner = new Scanner(System.in);
  6. int hours = Integer.parseInt(scanner.nextLine());
  7. int minutes = Integer.parseInt(scanner.nextLine());
  8. if(minutes <= 44) {
  9. minutes = minutes + 15;
  10. System.out.printf( " %d:%d" , hours , minutes ) ;
  11. }
  12. else {
  13. hours = hours + 1 ;
  14. minutes = 15 - (60 - minutes );
  15. System.out.printf( "%d:%d" , hours , minutes) ;
  16. }
  17. }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement