How to find angle between hands of clock between old time and new time?

Input1: 02:45:56 (string)
input2: 03:06:17 (string)
output:
1) angle between the old position of hour hand and new position of hour hand
2) angle between the old position of minute hand and new position of minute hand
3) angle between the old position of second hand and new position of second hand

Showing Answers 1 - 1 of 1 Answers

Sathya Hadadi

  • Apr 28th, 2015
 

Answer in code part

Code
  1. #include <stdio.h>

  2. #include <string.h>

  3. #include <conio.h>

  4. #include <stdlib.h>

  5. #define MIN_PER_HOUR        60.0F

  6. #define SEC_PER_MIN         60.0F

  7. #define SEC_PER_HOUR        (MIN_PER_HOUR*SEC_PER_MIN)

  8. #define DEGREE_FOR_1_HOUR   (360.0F/12.0F)

  9. #define DEGREE_FOR_1_SEC    (DEGREE_FOR_1_HOUR/SEC_PER_HOUR)

  10. "%f

  11. ""%f

  12. ""Enter first time in hh:mm:ss format

  13. ""%s""Enter second time in hh:mm:ss format

  14. ""%s"":""time 1 = %s is greater

  15. ""%d

  16. ""%d

  17. ""%d

  18. ""%d

  19. ""%d

  20. ""%d

  21. ""%f

  22. ""time 2 = %s is greater", time2);

  23.         }

  24.  

  25. }

  26.  

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions