Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cmath>
- #include <iomanip>
- using namespace std;
- int main() {
- const float pi=4*atan(1);
- float y,x,pa;
- cin>>x>>y;
- pa=atan2(y,x);
- if(pa<0){
- cout<<fixed<<setprecision(6)<<pa+2*pi;
- }
- else {
- cout<<fixed<<setprecision(6)<<pa;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement