Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

please show your program in C++ only. make sure when it debuggs it gives you answer in the format : 7.67+j2.56 is equal to 8.086exp(j0.322)

image text in transcribed

please show your program in C++ only. make sure when it debuggs it gives you answer in the format : 7.67+j2.56 is equal to 8.086exp(j0.322) and 8.086exp(j0.322) is equal to 7.67+j2.56

A c omplex number can be expressed in rectangular Gi.e. 7.67+j2.56) or polar form (i.e. 8.086e032). In order to convert a complex number: a + jb to polar form: Ae!, use the equations A = /a2+D2, =tar(a). In order to convert a complex number: Ae'e to and rectangular form: a + jb, use the equations a-A cos() , and b-Asin (). Write a program that converts from one form to the other. It should (1) prompt for what sort of conversion to do: Convert to rectangular (1), or polar (2) form? and then (2) ask for either A and 0 (conversion to rectangular case), or a and b (conversion to polar case). Your program should employ the proper conversion equations and then print out the results. Youcan word the statement something like: 7.67+j2.56 is equal to 8.086exp(j0.322) for the conversion to polar case, and 8.086expgo. 322) is equal to 7.67+j 2.56"for the conversion to rectangular case Note: Use the function atan2() to do the inverse-Tangent. You can also use the above example as a test-case

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered 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

Students also viewed these Databases questions