Question: You are asked to find the angle between the minute hand and the hour hand on a regular analog clock. Assume that the second hand,

 You are asked to find the angle between the minute hand

You are asked to find the angle between the minute hand and the hour hand on a regular analog clock. Assume that the second hand, if there were one, would be pointing straight up at the 12. Give all angles as the smallest positive angles. For example 9: 00 is 90 degrees: not -90 or 270 degrees. Input: The input is a list of times in the form H: M, each on their own line, with 1 lessthanorequalto H lessthanorequalto 12 and 00 lessthanorequalto M lessthanorequalto 59. The input is terminated with the time '0: 00'. Note that H may be represented with 1 or 2 digits (for 1-9 or 10-12, respectively): M is always represented with 2 digits (the input times are what you typically see on a digital clock). Output: The output displays the smallest positive angle in degrees between the hands for each time. The answer should between 0 degrees and 180 degrees for all input times. Display each angle on a line by itself in die same order as the input. The output should be rounded to the nearest 1/1000, i.e., three places after the decimal point should be printed

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!