Central angle of a N sided Regular Polygon | Java program for the above approach ; Function to calculate central angle of a polygon ; Calculate the angle ; Driver code
class GFG { static double calculate_angle ( double n ) { double total_angle = 360 ; return total_angle / n ; } public static void main ( String [ ] args ) { double N = 5 ; System . out . println ( calculate_angle ( N ) ) ; } }