Find the side of the squares which are lined in a row , and distance between the centers of first and last square is given | Java program to find side of the squares which are lined in a row and distance between the centers of first and last squares is given ; Driver code
import java . io . * ; class GFG { static void radius ( int n , int d ) { System . out . print ( " The ▁ side ▁ of ▁ each ▁ square ▁ is ▁ " + d / ( n - 1 ) ) ; } public static void main ( String [ ] args ) { int d = 42 , n = 4 ; radius ( n , d ) ; } }