Question: The area of a pentagon can be computed using the following formula: Write a method that returns the area of a pentagon using the following
The area of a pentagon can be computed using the following formula:
Write a method that returns the area of a pentagon using the following header:public static double?area(double?side)Write a main method that prompts the user to enter the side of a pentagon and displays its area. Here is a sample run:
5 s? Area 4 X tan 5 -Enter Enter the side: 5.5 The area of the pentagon is 52.04444136781625
Step by Step Solution
3.35 Rating (161 Votes )
There are 3 Steps involved in it
Output Enter side of pentagon 23 Area 5124998886393561 Program read... View full answer
Get step-by-step solutions from verified subject matter experts
