Optional Project 14: Finding the Center and Radius given Circle in General Form

Suppose a particular town is on a grid with the middle of the town at coordinate (0, 0).

The border for a radio signal is formed by the equation:

We can use the equation of the circle to determine the center of the circle (where the radio signal is originating) and the radius of the circle (how far the signal reaches).

The radio signal originates at coordinate (2, 4) or two miles east and four miles north of the center of the town.  The signal spreads 5 miles in all directions from this location.

Optional Project 14: Variables 'c', 'd', 'e' have been initialized.  These values represent the coefficients of the equation of a circle in general form (as shown above).

Task: Appropriately initialize the values for 'x', 'y', and 'r' that represent the coordinate of the center (x, y) and the radius (r) of the circle.

**If your code works for 5 test cases, you can enter your e-mail address

Universal Computational Math Methods:

pow(5,2) returns 25.0

abs(-3.0) returns 3

sqrt(49.0) returns 7.0