P2 P3 P1 (0, 0) P4 P5 (c)

Enhanced Discovering Computers 2017 (Shelly Cashman Series) (MindTap Course List)
1st Edition
ISBN:9781305657458
Author:Misty E. Vermaat, Susan L. Sebok, Steven M. Freund, Mark Frydenberg, Jennifer T. Campbell
Publisher:Misty E. Vermaat, Susan L. Sebok, Steven M. Freund, Mark Frydenberg, Jennifer T. Campbell
Chapter4: Programs And Apps: Productivity, Graphics, Security, And Other Tools
Section: Chapter Questions
Problem 30SG
icon
Related questions
Question

Suppose a pentagon is centered at (0, 0) with one point
at the 0 o’clock position, as shown in Figure . Write a program that prompts
the user to enter the radius of the bounding circle of a pentagon and displays the
coordinates of the five corner points on the pentagon from p1 to p5 in this order.

Use console format to display two digits after the decimal point. Here is a sample
run:

Enter the radius of the bounding circle: 100.52 ↵Enter
The coordinates of five points on the pentagon are
(95.60, 31.06)
(0.00, 100.52)
(−95.60, 31.06)
(−58.08, −81.32)
(59.08, −81.32)

P2
P3
P1
(0, 0)
P4
P5
(c)
Transcribed Image Text:P2 P3 P1 (0, 0) P4 P5 (c)
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 1 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.
Recommended textbooks for you
Enhanced Discovering Computers 2017 (Shelly Cashm…
Enhanced Discovering Computers 2017 (Shelly Cashm…
Computer Science
ISBN:
9781305657458
Author:
Misty E. Vermaat, Susan L. Sebok, Steven M. Freund, Mark Frydenberg, Jennifer T. Campbell
Publisher:
Cengage Learning