VOOZH about

URL: https://www.geeksforgeeks.org/dsa/program-to-find-the-interior-and-exterior-angle-of-a-regular-polygon/

⇱ Program to find the Interior and Exterior Angle of a Regular Polygon - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

Program to find the Interior and Exterior Angle of a Regular Polygon

Last Updated : 9 Jun, 2022

Given the number of sides n of a regular polygon. The task is to find out the Interior angle and Exterior angle of the polygon.
Examples
 

Input : n = 6
Output : Interior angle: 120
 Exterior angle: 60

Input : n = 10
Output: Interior angle: 144
 Exterior angle: 36


 


Interior angle: The angle between two adjacent sides inside the polygon is known as the Interior angle. 
Formula to find the Interior angle:
Interior Angle = 
Exterior angle: The angle formed by any side of a polygon and the extension of its adjacent side is known as Exterior angle.
Exterior angle = 
 

👁 interior and exterior angle


Program to find interior and exterior angles of a Regular Polygon: 
 


Output
Interior angle: 144
Exterior angle: 36

Time Complexity: O(1)
Auxiliary Space: O(1)

Comment
Article Tags:
Article Tags: