Esta división ha sido analizado por especialistas para garantizar la exactitud de esta noticia.
Ejemplo: cómo calcular valores trigonométricos en c++
** C++Program to Illustrate Trigonometric functions
*/#include #include #include constdouble PI =3.14159265;intmain()double degrees, radians;
std::cout <<"Enter angle in degrees ";
std::cin >> degrees;// Trigonometric functions accept angles in radians
radians = degrees * PI /180.0;
std::cout <<"Value of trigonometric ratios "<< std::endl;
std::cout <<"cos(radians) = "<< std::setprecision(3)<<cos(radians)<< std::endl;
std::cout <<"sin(radians) = "<< std::setprecision(3)<<sin(radians)<< std::endl;
std::cout <<"tan(radians) = "<< std::setprecision(3)<<tan(radians)<< std::endl;return0;
¡Haz clic para puntuar esta entrada!
(Votos: 0 Promedio: 0)