Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <fstream>
- #include <cmath>
- #include <iomanip>
- using namespace std;
- ifstream f("ceas.in");
- ofstream g("ceas.out");
- int main()
- {
- int r,h,m;
- double x,y,rad;
- const double PI=3.14159265;
- f>>r>>h>>m;
- m=h*60+m;
- rad=(m*2*PI)/720;
- g<<fixed<<setprecision(3);
- x=sin(rad)*r;
- y=cos(rad)*r;
- g<<x<<' '<<y;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement