Hi, I am trouble writing a \"pseudocode\" algorithm of this solution, based on t
ID: 3877502 • Letter: H
Question
Hi, I am trouble writing a "pseudocode" algorithm of this solution, based on the books methods. I can not find the solutions manual, so I am stuck.
Please help
Explanation / Answer
ALGORITHM
Take input for n terms from the user
Assign a variable t=1
for i=1 to n
s=s+pow(-1,(i+1))* (power(x,t)) / ((float)factorial(t)); //to calculate the sum
print "x ^",t
if(i%2==0)
print "+"
else
print "-"
end if
t=t+2
end for
Print sum of series s
actual<- calculate the actual value of sin(n)
calculate error= actual - s/ actual *100
print error
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.