Find the angle of Rotational Symmetry of an N | Java program to find the angle of Rotational Symmetry of an N - sided regular polygon ; function to find required minimum angle of rotation ; Store the answer in a double variable ; Calculating the angle of rotation and type - casting the integer N to double type ; Driver code
import java . io . * ; class GFG { static double minAnglRot ( int N ) { double res ; res = 360 / ( double ) N ; return res ; } public static void main ( String [ ] args ) { int N = 4 ; System . out . println ( " Angle ▁ of ▁ Rotational ▁ Symmetry : ▁ " + minAnglRot ( N ) ) ; } }