Answered step by step
Verified Expert Solution
Link Copied!

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++ image text in transcribed

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 point

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

Understanding Oracle APEX 5 Application Development

Authors: Edward Sciore

2nd Edition

1484209893, 9781484209899