Advertisement
borkins

14. Time + 15 Minutes

Mar 24th, 2017
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.51 KB | None | 0 0
  1. /**
  2.  * Project: Simple_Conditions - created by borkins on 2017-03-25.
  3.  */
  4.  
  5. import java.util.Scanner;
  6.  
  7. public class _14_TimePlus_15_Minutes
  8. {
  9.     public static void main(String[] args)
  10.     {
  11.         Scanner console = new Scanner(System.in);
  12.        
  13.         int hours = Integer.parseInt(console.nextLine());
  14.         int minutes = Integer.parseInt(console.nextLine());
  15.        
  16.         minutes += 15;
  17.        
  18.         System.out.printf("%d:%02d", ((hours + (minutes / 60)) % 24), (minutes % 60));
  19.     }
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement