Question: 7. Program polarcoord.cpp: a. Write a function degrees2radians() which converts degrees to radians. The function has one parameter: an angle in degrees of type double.

 7. Program polarcoord.cpp: a. Write a function degrees2radians() which converts degrees

7. Program polarcoord.cpp: a. Write a function degrees2radians() which converts degrees to radians. The function has one parameter: an angle in degrees of type double. The function returns a value of type double which is the angle in radians. The formula to convert degrees to radians is: where D is degrees and R is radians. Write a function compute_coord() which computes the Cartesian (x, y) coordinates of a point from its polar coordinates (radius, angle) where angle is measured in radians. The function has four parameters listed in the following order: b. i. the polar radius of the point, ii. the polar angle in radians of the point, iii. the x-coordinate of the point, the y-coordinate of the point. iv. All parameters should have type double. The first two parameters should be passed by value and the last two parameters should be passed by reference. The function does not return any value, but it modifies the last two parameters. The formula to compute the x and y-coordinates from the polar coordinates is: x- radiusx cos(angle) y radius sin(angle), where radius is the polar radius, angle is the angle measured in radians, x is the x coordinate and y is the y-coordinate of the point

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!