Advertisement
Tolyamba

Untitled

Jun 15th, 2016
210
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.63 KB | None | 0 0
  1. //CF_TR5_A_v15
  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.     //FILE *fff;
  13.     long double x, y;
  14.     /*ifstream file_in("angle1.txt");
  15.     file_in >> x >> y;
  16.     file_in.close();*/
  17.     freopen("angle1.txt", "rt", stdin);
  18.     scanf("%d%d", &x, &y);
  19.     fclose(stdin);
  20.    
  21.     long double ang = 0;
  22.     ang = atan2(y, x);
  23.        
  24.     //ofstream file_out("angle2.txt");
  25.     ////file_out << ang;
  26.     //fprintf(file_out, "%d", ang);
  27.     //file_out.close();
  28.  
  29.     freopen("angle2.txt", "wt", stdout);
  30.     printf("%d", ang);
  31.     fclose(stdout);
  32.  
  33.     //system("pause");
  34.     return 0;
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement