Advertisement
JosepRivaille

P37760: Trigonometria

Mar 14th, 2015
893
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.29 KB | None | 0 0
  1. #include <iostream>
  2. #include <cmath>
  3. using namespace std;
  4.  
  5.  
  6. //Pre: Llegeix un angle en graus
  7. //Post: Obtenim el sinus i cosinus
  8. int main() {
  9.     cout.setf(ios::fixed);
  10.     cout.precision(6);
  11.     double x;
  12.     while (cin >> x) {
  13.         x = (x*M_PI)/180;
  14.         cout << sin(x) << ' ' << cos(x) << endl;
  15.     }
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement