answersLogoWhite

0


Best Answer

Lets start by thinking of a clock as a circle, with directly up being 0 degrees. At 12:00, both hands are at 0 pointing straight up. Every 60 minutes, the minute hand will make a complete revolution, so at any given time its angle is:

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);

}

User Avatar

Wiki User

15y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: C code to find angle between hour hand and minute hand?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

How do you find the angle between the two hands of clock?

Each minute is six degrees.


C program to find the angle between the needles of a clock?

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 clockhour -= 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


What is the size of an angle when the sine is point6352?

39o26' (to the nearest minute) Explanation: Let the angle = θ sinθ = 0.6352 To find the angle of sinθ, you must apply sin-1 to sinθ. sin-1θ = 39o26'5.35"


What angle will you find in an triangle?

Any angle between 0 and 180 degrees or 0 and pi radians.


Find the measure of an angle such that the difference between the measures of its supplement and three times its complement is 60"The measure of the angle is?

explement of the angle or conjugate of an angle


How do you find angle between vectors?

To find the angle between two vectors, you need to use this form: a ∙ b / (|ab|) = cos(θ) θ = arccos(a ∙ b / (|ab|)) where a and b are vectors. Compute the dot product and the norm of |a| and |b|. Then, compute the angle between the vectors.


How do you find angle of depression?

The angle of depression of a point is the angle between the line joining that point and the point of observation and the horizontal from the point of observation.


How do you find the angle between two points?

You have to convert them to Polar Points or the Azimuth points and use the angle difference.


How to Find the angle between the reflected ray and the vertical?

i have no idea son


Find the angle between the tangents of a circle?

It's 60 degrees.


How do you find the included angle?

The common vertex between two points


Where would you find a 45 degree angle?

Find a square and draw lines on the diagonals. The angle between a diagonal line and side line is 45 degree.