Answered step by step
Verified Expert Solution
Question
1 Approved Answer
In c++ Program polarcoord. cpp: Write a function degrees2radians() which converts degrees to radians. The function has one parameter: an angle in degrees of type
In c++
Program polarcoord. cpp: 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: a. R=D/180 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, iv. the y-coordinate of the point. 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"radius X cos(angle), y- radius x 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 pointStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started