#include#include int main() { double angle = M_PI/4; // 45 degrees in radians double sineValue = std::sin(angle); std::cout << "The sine of " << angle << " radians is: " << sineValue << std::endl; return 0; }
#includeThis code prompts the user to enter an angle in radians, calculates the sine value using std::sin() function, and then prints the result to the console. Package Library: This function is included in the cmath package library.#include int main() { double angle = 0.0; // in radians double sineValue = 0.0; std::cout << "Enter an angle in radians: "; std::cin >> angle; sineValue = std::sin(angle); std::cout << "The sine of " << angle << " radians is: " << sineValue << std::endl; return 0; }