(15C) Regular Polygons - Printable Version +- HP Forums (https://www.hpmuseum.org/forum) +-- Forum: HP Software Libraries (/forum-10.html) +--- Forum: General Software Library (/forum-13.html) +--- Thread: (15C) Regular Polygons (/thread-8001.html) |
(15C) Regular Polygons - Eddie W. Shore - 03-23-2017 02:53 AM Inputs (Store values before running the program): R0: n, number of sides R1: s, length of each side Outputs: R2: θ, Internal Angle R3: A, Area R4: P, Perimeter Formulas Used (Degrees Mode Used): Internal Angle: θ = 180° - 360°/n Area: A = (s^2 * n)/(4 * tan (180°/n)) Perimeter: P = s * n Code:
Example: R0 = n = 5, R1 = s = 4. Output: θ = 108°, A ≈ 27.5276, P = 20 |