Question: Hello, I need some help with a homework assignment. (He also gave us a scaffolding to use, which I included.) The following formula gives the

Hello, I need some help with a homework assignment. (He also gave us a scaffolding to use, which I included.)

The following formula gives the distance between 2 points x1,x2 and y1,y2 in the cartesian plane: sqrt(pow(x1-x2,2) - pow(y1-y2,2)) given the center and a point on the circle, you can use this formula to find the radius of the circle. Write a program that prompts user to enter the center a point on the circle. The program should then output the circle radius, diameter, circumference and area. your program must have at least the following function: a)distance:this function takes as its parameters four numbers that represent tow points in the plane and returns the distance between them. b)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 return the circle radius. c)circumference: this function takes as its parameter a number that represents the radius of the circle and returns the circle circumference. d)area: this function takes as its parameter a number that represents the radius of the circle and return the circle area assume the pi = 3.1416

He also added this (It is my belief that part "B" should ask you to calculate the DIAMETER and not the radius. After all, the radius is the same as the distance. Right? Exactly. OK, then. :) Please calculate the Diameter instead for part "B", 'cuz that just makes more sense, at least to me!)

Hello, I need some help with a homework assignment. (He also gave

int choice; choice - 0; while (choice != 9) ShowMenu); if (choice -- 1) else if (choice -2) else if else if GetCoordinates (x1, y1, x2, y2); dist - CalculateDist(x1, yl, x2, y2); else if (choice -9) cout > x1; cout > yl; // ask for x2 and y2 here . float CalculateDist(int x1, int yl, int x2, int y2) float distance; distancesqrt return distance; put formula here

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!