C++. below there is the template of the problem, please useit where only where you see //edit, is where I need help in.My problem is that I'm not getting the same output as intended. Thefirst screenshot shows the correct output the secondscreenshot is my output. The part of the code you see//edit returns the sine of angle given in radians
Correct output
my output
Math Functions 1. Power 2. e^ x 3. Sine (x) 4. Quit Option: 3 Enter a value for x in degrees: 5 Number of terms for series sin(x): 5 n = 0 term is 0.0872665 n = 1 term is -0.000110762 n = 2 term is 4.21751e-08 n = 3 term is -7.64718e-12 n = 4 term is 8.08842e-16 sin( 5 ) = 0.0871558 Press any key to continue ####
Options: 3 Enter a value for x in degrees: 5 Number of terms for series sin(x): 5 n = 0 term is 0.0872664 n = 1 term is 0.0872664 n = 2 term is 4.21749e-08 n = 3 term is 4.21749e-08 n = 4 term is 8.08835e-16 sin( 5 = 0.174533
C++. below there is the template of the problem, please use it where only where you see //edit, is where I need help in.
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am