Advertisement
Tolyamba

Untitled

Jun 15th, 2016
205
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.54 KB | None | 0 0
  1. #define _CRT_SECURE_NO_WARNINGS
  2. #define M_PI 3.1415926535897932384626433832795
  3. #include <iostream>
  4. #include <stdio.h>
  5. #include <fstream>
  6. #include <cmath>
  7. #include <iomanip>
  8.  
  9. using namespace std;
  10.  
  11. int main()
  12. {
  13.     long double x, y;
  14.     ifstream file_in("angle1.in");
  15.     file_in >> x >> y;
  16.     file_in.close();
  17.        
  18.     long double ang = 0;
  19.     ang = atan2(y, x);
  20.        
  21.     ofstream file_out("angle1.out");
  22.     file_out << setprecision(15) << ang + M_PI;
  23.     file_out.close();
  24.  
  25.     //system("pause");
  26.     return 0;
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement