Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

May I get help to write the code to find sind and cos of angle using functions with function pass by reference only and find

May I get help to

image text in transcribed

write the code to find sind and cos of angle using functions with "function pass by reference only" and find Sind 2x and Cos 2x using the function for Cos and Sin. only part a

Tel: 348-5193 Time: T,Th: 12.30 PM 1.45 PM Due: Online & In Class 12.30 PM - October 3d 2017 Total 20 Points ASSIGNMENT 3 Problem - 1: The series expansion for cos, and sin, functions and trigonometric identities are as follows (r in radians) 20 Points sin(2x) = 2 sin x cos x cos(2x) = cos2 x-sinn a. Write a C++ program that calculates the value of the series sin z and cos r, sin 2r or cos 2r where the user enters the value of r (in degrees) and n the number of terms in the series. For example, if n 5, the prograrm should calculate the sum of 5 terms in the series for a given values of r. The program should use switch statements to determine the choice sin r and cos a, sin 2r or cos 2t. (Note: you may have to convert 7 Points degrees to radians for sin and cos functions). b. Draw a detailed flow chart on how this program is designed, indicating the necessary inputs, outputs and the gorithm you have used. The flow chart should be included in the document file along with your progranm 4 Points sting (s ce code) c. Now carry out a convergence study for n = 1 can use M.S. Excel or MATLAB to plot) 7 for a given value of x and plot the convergence graph (you 4 Points Problem - 2: Write C++ nested if statements corresponding to the conditions illustrated in Figure 1. You may provide only the necessary if-else statements and can assume that the variables have been declared previously 5 Points Figure 1: Represent using nested if statements 19th Sept, 2

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_2

Step: 3

blur-text-image_3

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

The Database Factory Active Database For Enterprise Computing

Authors: Schur, Stephen

1st Edition

0471558443, 9780471558446

More Books

Students also viewed these Databases questions

Question

2. How will the team select a leader?

Answered: 1 week ago