Question: Part 2: One hour, Program writing Marks: 40 a) Consider the following series, this series will evaluate the value of y(x) from n = 0
Part 2: One hour, Program writing Marks: 40 a) Consider the following series, this series will evaluate the value of y(x) from n = 0 up to infinity, for any value of x greater than 2. Y(x) = (-1)" for x > 2.0 Y(x) = 0.0 for x S 2.0 Using function, develop a C++ program that will ask the user to enter the value of x and will return Y(x). The program will keep running until (-1)" is less than 1.2 x 10-9. Mark 1 Please enter the value of x: ** The value of Y(x)= ** Marking scheme Part Documentation Compiler directives Comments Input Output Variable Declaration Formulae Function prototype Function Return value Total 1 1 3 2 2 2 5 2 20
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
