Solved by Expert Tutors
Solved by Expert Tutors
Question

The following formula gives the distance between two points, (x₁,y₁) and (x₂,y₂) in

the Cartesian plane:
\sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}
(
Given the center and a point on the circle, you can use this formula to find the radius of the circle.
Instructions
Write a program that prompts the user to enter the center and a point on the circle. The program should then output the circle's radius, diameter, circumference, and area. Your program must have at least the following functions:

-distance: This function takes as its parameters four numbers that represent two points in the plane and returns the distance between them.
-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 returns the circle's radius.
-circumference: This function takes as its parameter a number that represents the radius of the circle and returns the circle's circumference. (If r is the radius, the circumference is 2πr.)
-area: This function takes as its parameter a number that represents the radius of the circle and returns the circle's area. (If r is the radius, the area is πr².) Assume that π = 3.1416.Format your output with setprecision(2) to ensure the proper number of decimals for testing!

Step-by-step answer

a. Fusce dui lectus, congue vel laoreet ac,acinia pulvi

inia

a. Fusce dui lectus

usce dui lectus

or nec facilisis.

sum dolor sit amet,

sum dolor sit amet, con

iscing elit. Nam lacinia pulvinar tortor nec facilio

o. Donec aliquet.

usce dui lectus, congue vel laoreet ac, dictum vitae odio. Donec alique

ongue vel laoreet ac, dictum vitae odio. Donec al

ac, dictum vitae odio. Donec aliquet. Lorem ipsum

ec fac

ur laoreet. Nam risus ante, dapibus a molestie conseq

congue vel laoree

o

onec aliquet. Lorem ipsum dolor sit amet, consecto

e vel laoreet a

usce dui lectus, congue vel laoreet ac, dictum vitae odio. Donec alique

facilisis. Pellentesque dapibus efficitur laoreet

ec aliquet. Lorem ipsum dolor sit amet, consectet

ac,

trices

entesque dapibus efficitur laoreet. Nam risus ante,

at, ultrices ac

o

s a molestie consequat, ultro

sum dolor sit am

o

o. Donec aliquet. Lo

m ipsum dolor sit ame

o

, consectetu

or nec facilisis. Pellente

ia pulvinar tortor nec facilisis. Pellentesque dapibus

facilisis. Pellentesque d

iscing elit. Nam lacinia pulvinar tortor nec

acinia pulvi

m ipsum dolor sit amet, consectetur adipisci

m ipsum dolo

trices ac magna. Fusce dui lectus, congue ve

s a molestie

facilisis. Pellentesque dapibus efficitur

entesque dap

ac, dictum vitae odio. Donec al

ultrices ac magna. Fusce dui lectus, congue vel laoreet ac, dictum vitae odio. Donec aliquet. Lorem

a molestie consequat, ultrices ac magna. Fusce dui lectus, congue vel

ac, dictum vitae odio. Donec aliquet. Lorem ipsum dolor sit amet, consectetur ad

or nec facilisis. Pellentesque dapibus efficitur laoreet. Nam

m ipsum dol

o

ac, dictum vit

CircleProperties.jpg

CircleProperties.jpg
, consectetur adipiscing elit. Nam lacinia pulvinar ur laoreet. a molestie consequat, ultrices a ur laoreet. Nam risus ante, dapi ce dui lectus, congue vel laoree tesque dapibus efficitur laoreet.

Subscribe to view the full answer

Why Join Course Hero?

Course Hero has all the homework and study help you need to succeed! We’ve got course-specific notes, study guides, and practice tests along with expert tutors.

  • -

    Study Documents

    Find the best study resources around, tagged to your specific courses. Share your own to gain free Course Hero access.

    Browse Documents
  • -

    Question & Answers

    Get one-on-one homework help from our expert tutors—available online 24/7. Ask your own questions or browse existing Q&A threads. Satisfaction guaranteed!

    Ask a Question