NVIDIA Interview Question
Software Engineer / Developershour angle = 360 * (hour % 12)/12;
Minute Angle = 6* minutes.
So for 3 .30 hour angle = 360* (3%12)/12 = 90 degrees
minute angle = 6*30 = 180 degrees
So angle = 180 -90 = 90 degrees
wrong ans, at 3:30 hrs the hour hand is beyond 3 and it cannot form right angle(90 deg) with minutes hand...it's some what less that 90
The hour hand of a normal 12-hour analogue clock turns 360° in 12 hours (720 minutes) or 0.5° per minute. The minute hand rotates through 360° in 60 minutes or 6° per minute. So,the angle between Hr hand and Minutes hand is |0.5*(60*h + m) - 6*m|. For example angle between hr hand and minutes hand at 3hr 30 minutes is |0.5*(60*3 + 30) - 6*30| = |0.5*210 - 90| = 75 degree.
- Pandu May 06, 2011