Microsoft Interview Question
Software Engineer in TestsThe above answer is wrong.
6*(5*hrs-(11/12)*min)
If you consider time as 3:48)
so 6*(5*3-(11/12)*48) = -174
Take the MOD.
Above given formula are just shortcuts of the following. You dont need to mug it up. Just use the following formulae..
Mod((H*30+M*0.5) - (M * 6))
Hour hand moves 30Deg/Hr & 0.5Deg/Min
Min Hand moves 6Deg/Min. And, 360Deg/Min(Ignored)
(360+(5*hrs-11*min)/12)%360
- Anonymous February 23, 2010