Program to find the Interior and Exterior Angle of a Regular Polygon | CPP program to find the interior and exterior angle of a given polygon ; function to find the interior and exterior angle ; formula to find the interior angle ; formula to find the exterior angle ; Displaying the output ; Driver code ; Function calling
#include <iostream> NEW_LINE using namespace std ; void findAngle ( int n ) { int interiorAngle , exteriorAngle ; interiorAngle = ( n - 2 ) * 180 / n ; exteriorAngle = 360 / n ; cout << " Interior ▁ angle : ▁ " << interiorAngle << endl ; cout << " Exterior ▁ angle : ▁ " << exteriorAngle ; } int main ( ) { int n = 10 ; findAngle ( n ) ; return 0 ; }