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