Sum of sides of largest and smallest child polygons possible from a given polygon | Java program for the above approach ; Function to find the sum of largest and smallest secondary polygons if possible ; Count edges of primary polygon ; Calculate edges present in the largest secondary polygon ; Driver Code ; Given Exterior Angle
import java . io . * ; import java . util . * ; class GFG { static void secondary_polygon ( int Angle ) { int edges_primary = 360 / Angle ; if ( edges_primary >= 6 ) { int edges_max_secondary = edges_primary / 2 ; System . out . println ( edges_max_secondary + 3 ) ; } else System . out . println ( " Not ▁ Possible " ) ; } public static void main ( String [ ] args ) { int Angle = 45 ; secondary_polygon ( Angle ) ; } }