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
AleksAgata [21]
3 years ago
7

(Geometry: area of a regular polygon)

Computers and Technology
1 answer:
nata0808 [166]3 years ago
8 0

Answer:

import math

n = int(input("Enter the number of sides: "))

s = float(input("Enter the length of a side: "))

area = (n * s**2) / (4 * math.tan(math.pi/n))

print("The area is: " + str(area))

Explanation:

*The code is in Python.

Import the <u>math</u> to be able to compute the <em>pi</em> and <em>tan</em>

Ask the user to enter the number of sides and the length of a side

Calculate the area using the given formula

Print the area

You might be interested in
Given that two int variables, total and amount, have been declared, write a sequence of statements that: initializes total to 0
artcher [175]

Answer:

Following are the program in C++ language :

#include <iostream> // header file

using namespace std; // using namespace

int main() // main method

{

   int amount,total=0; // two int variable declaration

   cout<<" enter amount:";

   cin>>amount; // read input amount first time

   total=total+amount; // first calculation

   cout<<" enter amount:";

   cin>>amount; //read input amount second time

   total=total+amount;// second calculation

   cout<<" enter amount:";

   cin>>amount;// read input amount third time

   total=total+amount;// third calculation

   cout<<"total:"<<total; // display total

  return 0;

}

Output:

enter amount:12

enter amount:12

enter amount:12

total:36

Explanation:

Following are the explanation of program which is mention above

  • Declared the two variable total and amount of int type .
  • Initialize the variable total to "0".
  • Read the 3 input in "amount" variable in one by one by using cin function and adding their value to the "total "variable .
  • Finally display the total.
6 0
3 years ago
Question 1
likoan [24]

Answer:

No Answer by by a third jsjshs

7 0
1 year ago
Match each word to its correct meaning.
seropon [69]
1. goes to C.

2. goes to B.

3. goes to A.
6 0
3 years ago
Write a program in java to enter a character.The program displays the message "uppercase vowel" if entered character is uppercas
horrorfan [7]

Answer:

d

Explanation:

i think

3 0
3 years ago
Question
Serhud [2]
Could be second or all of above
8 0
3 years ago
Other questions:
  • An employee who interacts with customers regarding the nature of their car problems, rather than actually working on the vehicle
    12·2 answers
  • What type of wireless connection requires an unobstructed "line of sight" between transmitter and receiver?
    8·1 answer
  • Egyptian hieroglyphs were part of a writing system used by the ancient Egyptians. What type of graphic design elements did they
    13·1 answer
  • Jeremy wants to run a program file from the command prompt. Which of the following should Jeremy type in the command prompt wind
    8·2 answers
  • Go online and research the computer topic
    6·1 answer
  • Sierra owns a small business and handles many responsibilities, from logistics to marketing. She's seen a lot of success with Go
    11·1 answer
  • You have a passage of text that needs to be typed out, but some of the letter keys on your keyboard are broken! You're given an
    14·1 answer
  • A sensitive manufacturing facility has recently noticed an abnormal number of assembly-line robot failures. Upon intensive inves
    10·1 answer
  • You can resize a row in a table by dragging the ____.
    13·1 answer
  • The current annual interest rate is 5 percent, and you are taking out a 20-year loan with a monthly end-of-month payment. If you
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!