PROGRAMMING:Calculate time subtraction
Topic Description: define a time class, hour and minute are its two private member data. Enter a start time and an end time (the start time is earlier than the end time), and calculate the number of minutes between the two times through operator overload - (minus sign). Note: the two times are within the same day, and the 24-hour time fraction is used, that is, from 00:00 to 23:59.
Input format: the test input contains several test cases, and each test case occupies one line. Each test case consists of four numbers separated by spaces. Each number is composed of two digits. The first number and the second number represent the hour and minute of the start time respectively, and the third number and the fourth number represent the hour and minute of the end time respectively. When a test case read in is 00, the input ends, and the corresponding result is not output.
Output format: output one line for each test case. Output a number, indicating the number of minutes between the two.
Input example:
12 11 12 58
00 13 16 00
09 07 23 59
00 00 00 00
Output example:
47
947
892
answer:If there is no answer, please comment
Input format: the test input contains several test cases, and each test case occupies one line. Each test case consists of four numbers separated by spaces. Each number is composed of two digits. The first number and the second number represent the hour and minute of the start time respectively, and the third number and the fourth number represent the hour and minute of the end time respectively. When a test case read in is 00, the input ends, and the corresponding result is not output.
Output format: output one line for each test case. Output a number, indicating the number of minutes between the two.
Input example:
12 11 12 58
00 13 16 00
09 07 23 59
00 00 00 00
Output example:
47
947
892
answer:If there is no answer, please comment