Question: Suppose a pentagon is centered at (0, 0) with one point at the 0 oclock position, as shown in Figure 4.4c. Write a program that
Suppose a pentagon is centered at (0, 0) with one point at the 0 o’clock position, as shown in Figure 4.4c. 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
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)
Step by Step Solution
3.36 Rating (168 Votes )
There are 3 Steps involved in it
public class Exercise0407 public static void mainString args javautilScanner input new javautilScann... View full answer
Get step-by-step solutions from verified subject matter experts
