Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class Time15Minutes {
- public static void main(String[] args) {
- Scanner scanner = new Scanner(System.in);
- int A = Integer.parseInt(scanner.nextLine());
- int B = Integer.parseInt(scanner.nextLine());
- int C = A*60+B;
- int D = C+15;
- int E = D/60;
- int F = D%60;
- if(E>=24){
- E=E-24;
- }
- System.out.printf("%d:%02d", E , F );
- }
- }
Add Comment
Please, Sign In to add comment