In java:

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

In java:

Post by answerhappygod »

In java:
In Java 1
In Java 1 (44.55 KiB) Viewed 22 times
Question 1 Unlimited tries (65) (Geometry: area of a regular polygon) A regular polygon is an n-sided polygon in which all sides are of the same length and all angles have the same degree (i.e., the polygon is both equilateral and equiangular). The formula for computing the area of a regular polygon is : area = n*s^2/(4 * tan(pi/n)) Here, s is the length of a side. Write a program that prompts the user to enter the number of sides and their length, and displays its area. Sample Run Enter the number of sides: 5 Enter the length of the side: 6.5 The area of the polygon is 72.69017017488385 Class Name: Exercise04_05 If you get a logical or runtime error, please refer https://liveexample.pearsoncmg.com/faq.html.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply