Menu

Programming Challenge Description Write Program Given Two Clock Times Prints Absolute Numb Q43881244

Programming challenge description:

Write a program that, given two clock times, prints out theabsolute number of minutes between them.

Input:

Your program should read lines from standard input. Each linecontains two wall clock times separated by a hyphen. Wall clocktime is defined as hh:mm followed by AM’ or ‘PM’, e.g. ’09:05AM’

Output:

Print to standard output the number of minutes between the twotimes from standard input. Print out each result on a new line.

Test 1

Test Input

10:00 AM – 11:00 AM

Expected Output

60

Test 2

Test Input

1:00 PM – 11:00 AM

Expected Output

1320

Expert Answer


Answer to Programming challenge description: Write a program that, given two clock times, prints out the absolute number of minute…

OR