/home/manu/Projets/cercle/main.cpp |
1 #include <iostream> 2 #include <iomanip> 3 #include <math.h> 4 using namespace std; 5 6 int main() 7 { 8 double degre; 9 const double PI = 3.141592654; 10 const double CONVERSION = PI / 180.0; 11 12 cout << "Calcul automatique du sinus et du cosinus" << endl; 13 cout << "Donnez votre angle en degré = "; 14 cin >> degre; 15 cout << setprecision(3); 16 cout << "sin(" << degre << "°) = " << sin(degre*CONVERSION) << endl; 17 cout << "cos(" << degre << "°) = " << cos(degre*CONVERSION) << endl; 18 return 0; 19 } 20 21