## CS13002 Programming and Data Structures | ## Section: 5/E, Spring 2006 |

## Warm-up assignment

(Not for submission)## Part I

Find out at what times between 10 and 11 hours, the hour and minute hands of a clock are perfectly perpendicular to one another. Print the times as10 hours

mminutes,where

mis a floating-point number larger than or equal to 0 and less than 60.## Part II

Try to generalize the above program. The user inputs an hourhbetween 1 and 12. Your task is to find out at what times of the form

hhoursmminutesthe hour and minute hands of a clock are perfectly perpendicular to one another. Here 0 <=

m< 60. Exactly two of the twelve possible values ofhcorrespond to single solutions form. Locate these values ofh.Notice that for solving this part, you may have to use a conditional statement (an

ifstatement). If you do not know how such statements can be written, repeat Part I with 10 hours replaced by 6 hours and also by 2 hours.