Here is the code for your part a.
#include #include using namespace std; int fact(int n) { if(n == 0) return 1; return n * fact(n-1); } double ePowerX(int x, int n) { double sum = 0; for(int i = 0; i >choice; cout>x; cout>n; switch(choice) { case 1: cout
I NEED HELP WITH PARTS B AND C!!!!!
ASSIGNMENT 3 Problem 1: The series expansion for the exponential, sine, and cosine functions are as follows: 1 +z C08 a. Write a C++ program that calculates the value of the series c sin z and cosz, where the user enters the value of z and the n the number of terms in the series. For example, if n 7, the program should calculate the sum of 7 terms in the series for a given values of z The program should use switch statements to determine the choice of the function. (Note: you may have to convert degrees to radians for sin and cos functions). 7 Points b. Draw a detailed flow chart on how this program is designed, indicating the necessary inputs, outputs and the algorithm you have used. The flow chart should be included in the document file along with your program listing (source code). 4 Points c. Now carry out a convergence study using different values of n for a given value of z and plot the convergence graph 4 Points ASSIGNMENT 3 Problem 1: The series expansion for the exponential, sine, and cosine functions are as follows: 1 +z C08 a. Write a C++ program that calculates the value of the series c sin z and cosz, where the user enters the value of z and the n the number of terms in the series. For example, if n 7, the program should calculate the sum of 7 terms in the series for a given values of z The program should use switch statements to determine the choice of the function. (Note: you may have to convert degrees to radians for sin and cos functions). 7 Points b. Draw a detailed flow chart on how this program is designed, indicating the necessary inputs, outputs and the algorithm you have used. The flow chart should be included in the document file along with your program listing (source code). 4 Points c. Now carry out a convergence study using different values of n for a given value of z and plot the convergence graph 4 Points