1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Gnesinka [82]
4 years ago
15

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²) / (4 * tan(π/n))
Write a method that returns the area of a regular polygon using the following header:
public static double area(int n, double side)
Write a main method that prompts the user to enter the number of sides and the side of a regular polygon and displays its area.
Computers and Technology
1 answer:
butalik [34]4 years ago
4 0

import java.util.Scanner;

public class polygon {

/** Main Method */

public static void main(String[] args) {

 Scanner input = new Scanner(System.in); // Create a Scanner

 // Prompt the user to enter the number of sides  

 // and the side of a regular polygon

 System.out.print("Enter the number of sides: ");

 int n = input.nextInt();

 System.out.print("Enter the side: ");

 double side = input.nextDouble();

 // Display the area of the regular polygon

 System.out.println("The area of the polygon is " + area(n, side));

}

/** Method area computes and returns the area of a regular polygon */

public static double area(int n, double side) {

 return (n * Math.pow(side, 2) / (4 * Math.tan(Math.PI / n)));

}

}

You might be interested in
How do i install java runtime environment?
nlexa [21]
Just go to the internet and download the file and install
please mark as brainliest

3 0
3 years ago
What is the output?
yuradex [85]

Answer:

this is x,y correct?

well if it is then wouldnt it be 5,30?

8 0
3 years ago
Write a Python class, Flower, that has three instance variables of type str, int, and float, that respectively represent the nam
MA_775_DIABLO [31]

Answer:

The python class is shown on the first uploaded image

Explanation:

6 0
3 years ago
Burtex Inc. is an application development organization. Twenty five of its knowledgeable employees are retiring in the upcoming
viktelen [127]

Answer:

Web 2.0

Explanation:

Web 2.0 describes the changes that occurs in technology and design of website so as to strengthen the sharing of information, cooperation and Web functionality. Most organization adopts Web 2.0 technology such as podcasts and wikis which is used to provide answers to frequently asked questions, determine the knowledge of old-time employees. It also helps to save time and effort required in training new staffs.

7 0
3 years ago
I WILL MAKE BRAINLIEST PLS HURRY
Oksanka [162]

Examples

<u>Lists: </u>

- Keep track of how much water you drink per day

- Hours spent on studying per week

- The growth of a plant

<u>Dictionaries:</u>

- Keep track of overall grades for each subject

- Keep track of where money is mostly spent on

- Dates for upcoming assessments and tests

Hope these examples help :)

5 0
3 years ago
Read 2 more answers
Other questions:
  • How can i add card reader to pc answers?
    9·1 answer
  • Which are ways action buttons can be used in presentations?
    11·2 answers
  • What does it mean when a return is rejected for code 0503?
    9·1 answer
  • Which of the following is a preferable method to secure wireless access in a SOHO?
    12·1 answer
  • Which of the following Internet protocols is used to request and send pages and files on the World Wide Web?
    15·1 answer
  • Select the guidelines you should follow when creating a resume
    12·2 answers
  • Dell Computer uses recycled and recyclable materials in its product and packaging design in an effort to minimize damage to the
    5·1 answer
  • Characteristics of 1st generation​ computers
    5·1 answer
  • __________ is a broad class of software that is surreptitiously installed on a user's machine to intercept the interaction betwe
    6·1 answer
  • The role of ICT In government.
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!