Question: Write a program that prompts the user ( in this order ) to enter a point in x and y coordinates, and a radius. Report

Write a program that prompts the user (in this order) to enter a point in x and y coordinates, and a radius.
Report if the point is within the circle centered at (0,0) with the given radius.
For example, the point (9,8) is outside the circle with radius 10, but (2,3) is within that circle.
Print "Within circle" for points within the radius
Print "Outside of circle" for points outside of the radius.
The distance formula is: (x2-x1)2+(y2-y1)22
Example runs:
X coordinate: 9
Y coordinate: 8
Radius: 10
Outside of circle
X coordinate: 2
Y coordinate: 3
Radius: 10
Within circle
 Write a program that prompts the user (in this order) to

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!