Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class uprajnenie {
- public static void main(String[] args) {
- Scanner scanner = new Scanner(System.in);
- int hour = Integer.parseInt(scanner.nextLine());
- int min = Integer.parseInt(scanner.nextLine());
- min = min + 15;
- if (min > 59){
- min = min - 60;
- hour = hour + 1;
- }
- if (hour > 23){
- hour = 0;
- }
- if (min < 10) {
- System.out.printf("%d:0%d", hour, min);
- }else{
- System.out.printf("%d:%d", hour, min);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement