Advertisement
a53

Ceas

a53
Jan 14th, 2017
161
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. #include <fstream>
  2. #include <cmath>
  3. #include <iomanip>
  4. using namespace std;
  5. ifstream f("ceas.in");
  6. ofstream g("ceas.out");
  7.  
  8. int main()
  9. {
  10. int r,h,m;
  11. double x,y,rad;
  12. const double PI=3.14159265;
  13. f>>r>>h>>m;
  14. m=h*60+m;
  15. rad=(m*2*PI)/720;
  16. g<<fixed<<setprecision(3);
  17. x=sin(rad)*r;
  18. y=cos(rad)*r;
  19. g<<x<<' '<<y;
  20. return 0;
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement