fork(1) download
  1. #include<math.h>
  2. typedef double d;d g(d x,d y,d a,d b){return(atan2(b-y,a-x))*180/3.14159;}
  3.  
  4. #include <stdio.h>
  5.  
  6. int main() {
  7. printf("%0.2f\n",g(5,5,5,-5));
  8. printf("%0.2f\n",g(5,-5,5,5));
  9. return 0;
  10. }
Success #stdin #stdout 0s 2160KB
stdin
Standard input is empty
stdout
-90.00
90.00