fork(2) download
  1. import java.util.*;
  2. import java.lang.*;
  3. import java.io.*;
  4.  
  5. class Ideone {
  6. public static void main (String[] args) {
  7. double hours = 10;
  8. double min = 47;
  9.  
  10. double minuteAngle = 360 / 60;
  11. double hourAngle = 360 / 12;
  12.  
  13. double res = hourAngle * (hours + min / 60) - min * minuteAngle;
  14. System.out.printf("Angle is: %s", res);
  15. }
  16. }
Success #stdin #stdout 0.12s 320576KB
stdin
Standard input is empty
stdout
Angle is: 41.5