fork download
  1. #include <bits/stdc++.h>
  2. #include <math.h>
  3. #include <iomanip>
  4. using namespace std;
  5. int main()
  6. {
  7. double a,b;
  8. cin>>a>>b;
  9. double c, pi;
  10. pi = atan2(0,-1);
  11. c = atan(b/a);
  12. if (c<0) c+=2*pi;
  13. cout<< fixed<< setprecision(8)<< c;
  14. return 0;
  15. }
Success #stdin #stdout 0s 16064KB
stdin
3 4
stdout
0.92729522