Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Given the center and a point on the circle, you can use this distance formula to

ID: 3661157 • Letter: G

Question

Given the center and a point on the circle, you can use this distance formula to find the radius of the circle. Write a program tha prompts the user to enter the center and a point on the circle. The program should output the circle's radius, diameter, circumference, and area. Your program must have at least the following functions: Distance: This functiontakes as its parameters four numbers that represent two points in the plane and returns the distance between them Radius: This function takes as its parameters four numbers that represent the center and a point on the circle, calls the function distance to find the radius of the circle, and returns the circle's radius. circumference: This function takes as its parameter a number that represents the radius of the circle and returns the circle's circumference. Area: This functions takes as its parameter a number the represents the radius of the circle and returns the circle's area. (IMPORTANT) also need to use PASS BY REFERNCE to run the program).

Explanation / Answer

#include #include using namespace std; float distance(float Cx, float Cy, float Rx, float Ry){ return (sqrt(powf((Cx - Rx), 2.0f) + powf((Cy - Ry), 2.0f))); } float radius(float Cx, float Cy, float Rx, float Ry){ return distance(Cx, Cy, Rx, Ry); } float circumference(float radius){ return 2.0f*3.1416f*radius; } float area(float radius){ return 3.1416f*radius*radius; } int main(){ float Cx = 0.0f, Cy = 0.0f, Rx = 0.0f, Ry = 0.0f, rad = 0.0f; coutCx; coutCy; coutRx; coutRy; cout
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote