Advertisement
Tolyamba

Untitled

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