C Exercises: Find angle between given hour and minute hands
28. Angle Between Clock Hands Variants
Write a C program to find the angle between the hour and minute hands.
Example:
Input: int ha = 11
int ma = 30
Output: Angle between hour and minute hands 165
Sample Solution:
C Code:
Sample Output:
Angles move by hour hand: 11 Angles move by minute hand: 30 Angle between hour and minute hands 165
Flowchart:

For more Practice: Solve these Related Problems:
- Write a C program to compute the angle between the hour and minute hands for any given time using arithmetic.
- Write a C program to calculate the smallest angle between clock hands and handle edge cases at 12 o'clock.
- Write a C program to find the angle between clock hands and display both the smaller and larger angles.
- Write a C program to compute the angle for multiple times given in an array and output the results.
C Programming Code Editor:
Improve this sample solution and post your code through Disqus.
Previous: Multiply two numbers using bitwise operators.
Next: Perfect square.
What is the difficulty level of this exercise?
Test your Programming skills with w3resource's quiz.