fork(2) download
  1. using System;
  2.  
  3. public class Test
  4. {
  5. public static void Main()
  6. {
  7. int hours = 15;
  8. int minutes = 20;
  9.  
  10. Math.DivRem(hours, 12, out hours);
  11. var minutesAngle = minutes * 6;
  12. var hoursAngle = hours * 30 + (minutes / 2.0);
  13.  
  14. Console.WriteLine(Math.Abs(hoursAngle - minutesAngle));
  15. Console.ReadLine();
  16. }
  17. }
Success #stdin #stdout 0.03s 23920KB
stdin
Standard input is empty
stdout
20