Advertisement
a53

sin_cos

a53
Mar 23rd, 2020
240
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. #include <iostream>
  2. #include <cmath>
  3. #include <iomanip>
  4. #define PI 3.14159265
  5. using namespace std;
  6.  
  7. int main()
  8. {
  9. int x;
  10. cin>>x;
  11. double s=(int)(sin(x*PI/180)*1000),c=(int)(cos(x*PI/180)*1000);
  12. cout<<fixed<<setprecision(3)<<s/1000<<' '<<c/1000;
  13. return 0;
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement