Problem Descriptions: In this problem, your task is to write a program to find whether a user-entered 2-D point (P) lies (i) (ii) (iii) The circles are specified using their center coordinates and radii. See the illustrations below showing all three cases you need to consider: within both of the two given circles, within only one of those circles, or outside both circles (treat a point ON a circle as being inside the circle). Pis inside both circles Pis outside beth circles Pis inside ONLY one circle Sample Outputs: Sample output #1 POINT MEMBERSHIP WITHIN TWO CIRCLES Circle 1: center at ( 6, -5 ) and radius: 3 Circle 2: center at ( 12, -7 ) and radius: 5 Please enter the x-coordinate of the test point: 8 Please enter the y-coordinate of the test point: -5 Point lies within both circles. Sample output #2 POINT MEMBERSHIP WITHIN TWO CIRCLES Circle 1: center at ( 6, -5 ) and radius: 3 Circle 2: center at ( 12, -7 ) and radius: 5 Please enter the x-coordinate of the test point: 12 Please enter the y-coordinate of the test point: -7 Point lies within ONLY ONE of the circles. Sample output #3 POINT MEMBERSHIP WITHIN TWO CIRCLES Circle 1: center at ( 6, -5 ) and radius: 3 Circle 2: center at ( 12, -7) and radius: 5 Please enter the x-coordinate of the test point: Please enter the y-coordinate of the test point: -1 Point lies outside both circles

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter5: Control Structures Ii (repetition)
Section: Chapter Questions
Problem 27PE
icon
Related questions
Question
100%
Problem Descriptions:
In this problem, your task is to write a program to find whether a user-entered 2-D point (P) lies
(i)
(ii)
(iii)
The circles are specified using their center coordinates and radii. See the illustrations below
showing all three cases you need to consider:
within both of the two given circles,
within only one of those circles, or
outside both circles (treat a point ON a circle as being inside the circle).
Pis outside both circles
Pis inside ONLY one circle
Sample Outputs:
Sample output #1
POINT MEMBERSHIP WITHIN TWO CIRCLES
Circle 1: center at ( 6, -5 ) and radius: 3
Circle 2: center at ( 12, -7 ) and radius: 5
Please enter the x-coordinate of the test point:
8
-5
Please enter the y-coordinate of the test point:
Point lies within both circles.
Sample output #2
POINT MEMBERSHIP WITHIN TWO CIRCLES
Circle 1: center at ( 6 , -5 ) and radius: 3
Circle 2: center at ( 12 , -7 ) and radius: 5
Please enter the x-coordinate of the test point:
12
Please enter the y-coordinate of the test point:
-7
Point lies within ONLY ONE of the circles.
Sample output #3
POINT MEMBERSHIP WITHIN TWO CIRCLES
Circle 1: center at ( 6 , -5 ) and radius: 3
Circle 2: center at ( 12 , -7 ) and radius: 5
Please enter the x-coordinate of the test point: 5
Please enter the y-coordinate of the test point:
-1
Point lies outside both circles
Transcribed Image Text:Problem Descriptions: In this problem, your task is to write a program to find whether a user-entered 2-D point (P) lies (i) (ii) (iii) The circles are specified using their center coordinates and radii. See the illustrations below showing all three cases you need to consider: within both of the two given circles, within only one of those circles, or outside both circles (treat a point ON a circle as being inside the circle). Pis outside both circles Pis inside ONLY one circle Sample Outputs: Sample output #1 POINT MEMBERSHIP WITHIN TWO CIRCLES Circle 1: center at ( 6, -5 ) and radius: 3 Circle 2: center at ( 12, -7 ) and radius: 5 Please enter the x-coordinate of the test point: 8 -5 Please enter the y-coordinate of the test point: Point lies within both circles. Sample output #2 POINT MEMBERSHIP WITHIN TWO CIRCLES Circle 1: center at ( 6 , -5 ) and radius: 3 Circle 2: center at ( 12 , -7 ) and radius: 5 Please enter the x-coordinate of the test point: 12 Please enter the y-coordinate of the test point: -7 Point lies within ONLY ONE of the circles. Sample output #3 POINT MEMBERSHIP WITHIN TWO CIRCLES Circle 1: center at ( 6 , -5 ) and radius: 3 Circle 2: center at ( 12 , -7 ) and radius: 5 Please enter the x-coordinate of the test point: 5 Please enter the y-coordinate of the test point: -1 Point lies outside both circles
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 4 images

Blurred answer
Knowledge Booster
Mathematical functions
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr