subject

Programming challenge description: Write a program that, given two clock times, prints out the absolute number of minutes between them.
Input:
Your program should read lines from standard input. Each line contains two wall clock times separated by a hyphen. Wall clock time is defined as hh:mm followed by AM' or 'PM', e. g. '09:05 AM'
Output:
Print to standard output the number of minutes between the two times 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

ansver
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 21.06.2019 19:30, xolocsin
Can you make money in why are you guys so
Answers: 1
image
Computers and Technology, 23.06.2019 01:30, solikhalifeoy3j1r
In deadlock avoidance using banker’s algorithm, what would be the consequence(s) of: (i) a process declaring its maximum need as maximum possible for each resource. in other words, if a resource a has 5 instances, then each process declares its maximum need as 5. (ii) a process declaring its minimum needs as maximum needs. for example, a process may need 2-5 instances of resource a. but it declares its maximum need as 2.
Answers: 3
image
Computers and Technology, 23.06.2019 07:50, kmart4062
Apython programming question: assume s is a string of lower case characters. write a program that prints the number of times the string 'bob' occurs in s. for example, if s = 'azcbobobegghakl', then your program should print number of times bob occurs is: 2
Answers: 3
image
Computers and Technology, 23.06.2019 10:00, serenityharmon1
Hey i just logged on and one of the moderators deleted a bunch of my answers to questions, even though the answers were right and the people it doesn't make sense but if anyone wants to talk about anything just message me lol (this is super random lol)
Answers: 1
You know the right answer?
Programming challenge description: Write a program that, given two clock times, prints out the abs...

Questions in other subjects:

Konu
Mathematics, 20.08.2021 14:00