Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

You are given an input representing the current military time in hours and minutes. You are also given two additional values, h and m. These

You are given an input representing the current military time in hours and minutes. You are also given two additional values, h and m. These are the hours and minutes that pass. Display the new current time.

Input Format

First line is a String value representing the current time. Second line is the number of elapsed hours. Third line is the number of elapsed minutes.

Constraints

The String representing the current time will always be 5 characters in length. The first two characters will be a value anywhere from 00 to 23 (midnight to 11pm). The third character will be a ':'. The last two characters will be a value anywhere from 00 to 59 (number of minutes of the hour). The elapsed hours value will be from 0 to 2 billion. The elapsed minutes value will be from 0 to 2 billion.

Output Format

Display a 5 character String representing the current military time after the elapsed hours and minutes have passed.

Sample Input 0

08:30 2 15 

Sample Output 0

10:45 

Explanation 0

The starting time is 8:30am. in 2 hours and 15 minutes it will be 10:45am

Sample Input 1

11:22 1 50 

Sample Output 1

13:02 

Explanation 1

It is 11:22. (Remember military time is from 0 to 23) in 1 hour and 50 minutes it will be 1:02pm which is 13:02 in military time

I need output for the sample input 1

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Systems Introduction To Databases And Data Warehouses

Authors: Nenad Jukic, Susan Vrbsky, Svetlozar Nestorov

1st Edition

1943153191, 978-1943153190

More Books

Students also viewed these Databases questions

Question

11.4. Describe how pro forma statements are prepared

Answered: 1 week ago