【Description】
Write a program to define a class Time, which contains three member variables: hour, minute and second
input and output time with >> and
use += and -= increase and decrease the time ,e.g.Time& operator+=(const Time&);Time& operator-=(const Time&);
【Input】
There are two line, each line is the time of a clock
Input format:hour minute second。
【Output】
There are two lines.
The first line is the output of time1 += (time2) ;
The second line is the output of time1 -= time2 ;
Output format:hour:minute:second;
Please read the
【Input example】
21 10 35
10 15 25
【Output example】
07:26:00
21:10:34
THE SOLUTION YOU SENT ME IS NOT GIVING THE REQUIRED OUTPUTS. PLEASE LOOK AND READ THE INPUT AND THE OUTPUT SAMPLES ABOVE CAREFULLY.
BELOW IS THE SLOTION YOU GAVE ME.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here