answersLogoWhite

0

minute_deg = minute * 360 / 60 = minute * 6;

The hour hand will make a complete revolution every hour, so its formula is:

hour_deg = hour * 360 / 12 = hour * 30;

A function to find the angle would be:

int angleBetweenHands(int hour, int minute)

{

if(hour > 12) // In case of 24 hour clock

hour -= 12;

int angle = hour * 30 - minute * 6;

if(angle > 180)

angle = 360 - angle;

return(angle);

}

Read more: C_code_to_find_angle_between_hour_hand_and_minute_hand

User Avatar

Wiki User

13y ago

Still curious? Ask our experts.

Chat with our AI personalities

BlakeBlake
As your older brother, I've been where you are—maybe not exactly, but close enough.
Chat with Blake
MaxineMaxine
I respect you enough to keep it real.
Chat with Maxine
FranFran
I've made my fair share of mistakes, and if I can help you avoid a few, I'd sure like to try.
Chat with Fran

Add your answer:

Earn +20 pts
Q: C program to find the angle between the needles of a clock?
Write your answer...
Submit
Still have questions?
magnify glass
imp