Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Here is the code for your part a. #include #include using namespace std; int fact(int n) { if(n == 0) return 1; return n *

image text in transcribed

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

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

Solve the system by substitution. 3x + 4y = 4 x - y = 13

Answered: 1 week ago