Question: Create a flow chart and a program to determine if a point, P(xx), lies WITHIN, ON, or OUTSIDE a circle of radius 5 1. Recall,
Create a flow chart and a program to determine if a point, P(xx), lies WITHIN, ON, or OUTSIDE a circle of radius 5 1. Recall, the equation of a circle centered at the origin of a Cartesian coordinate system is x2 + y2 Specifically A. Prompt the user to "Enter 1 to run the program or 2 to Quit', after a description of the program B. If1 a. Prompt the user to 'Enter the xvalue, X, Defined as Word b. Prompt the user to Enter the yxalue, Y Defined as Word c. Compute x squared -xvaluex.value, Defined as Woro d. Compute y..s.quared -yvaluey value, Defined as Word e. Compute BadiusSauared -xsauared+ y.sauared, Define as Word f. Determine if Radius Sauared is less than 25 g. Determine If Radiu Squared is equal to 25 h. Determine If Readius Squared is greater than 25 i. Display if point lies within, on, or outside of circle Loop to A C. If 2 a. Quit Note 1: PBASIC only allows for integer values for x and y Note 2: Use SDEC for X and Y, because each could be negative Note 3: Compute C, D, and E separately, otherwise there will be an overflow Note 4: Show output results for each case
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
