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]
3 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]3 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
What is the difference between arithmetic and logical operations​
s2008m [1.1K]

Answer: Arithmetic operators +, -, *, /, and % perform addition, subtraction, multiplication, division, and modulo operations. ... The concept of logical operators is simple. They allow a program to make a decision based on multiple conditions. Each operand is considered a condition that can be evaluated to a true or false value.

Explanation:

5 0
3 years ago
It is used between two or more computers. One computer sends data to or receives data from another computer directly.
dmitriy555 [2]

Answer:

File transfer protocol (FTP)

Explanation:

An information can be defined as an organized data which typically sent from a sender to a receiver. When a data is decoded or processed by its recipient it is known as information.

Generally, there are several channels or medium through which an information can be transmitted from the sender to a receiver and vice-versa. One of the widely used media is the internet, a global system of interconnected computer networks.

There's a standard framework for the transmission of informations on the internet, it is known as the internet protocol suite or Transmission Control Protocol and Internet Protocol (TCP/IP) model. One of the very basic rule of the TCP/IP protocol for the transmission of information is that, informations are subdivided or broken down at the transport later, into small chunks called packets rather than as a whole.

The three (3) main types of TCP/IP protocol are;

I. HTTP.

II. HTTPS.

III. FTP.

File transfer protocol (FTP) is used between two or more computers. One computer sends data to or receives data from another computer directly through the use of network port 20 and 21.

4 0
2 years ago
Zenmap's topology tab displays a __________ that shows the relative size and connection type of all discovered ip hosts.
VladimirAG [237]
<span>Zenmap's topology tab displays a "Bubble Chart" that shows the relative size and connection type of all discovered IP hosts.
</span>A kind of chart which shows three dimensional data is known as Bubble chart. It also can be seen as the variation of scatter plot where bubbles replace the data points.
4 0
2 years ago
5.4.6: Rolling Dice code
ziro4ka [17]
It is 15 all together
4 0
2 years ago
What is a utility application that monitors the network path of packet data sent to a remote computer?
stepladder [879]

Answer:

"Traceroute " is the  correct answer.

Explanation:

The traceroute commands in the networking that traces the network path The  traceroute is also displaying the information about the pack delay that is sent over the internet."Traceroute is also known as tracepath it means it calculated the path between the packets in the network. Traceroute takes the one IP address of the computer machine and taking another Ip address to calculate the path between the packets.

Traceroute Is a type of utility application that monitors the network between the packet that is sent into a remote computer.

7 0
3 years ago
Other questions:
  • Compare GBN, SR, and TCP (no delayed ACK). Assume that the timeout values for all three protocols are sufficiently long such tha
    7·1 answer
  • What is cpu????????????????????????????
    12·2 answers
  • This is the formula for the future worth of an investment over time with consistent additional monthly payments and a steady rat
    10·1 answer
  • Does any one play sniper clash 3d ??? ​
    9·2 answers
  • How do optical discs store data? select one:
    15·1 answer
  • When using social​ media, make sure to provide access to all the information needed to accurately process messages by following
    6·1 answer
  • Proxy download for school
    15·2 answers
  • (03.05 LC
    14·1 answer
  • Use the ________ tag to configure a generic area on a web page that is embedded within a paragraph or other block display elemen
    12·1 answer
  • Algorithm to eat orange<br><br>​
    10·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!