Driver code
public static void main ( String [ ] args ) { int [ ] arr = { 1 , 2 , 3 } ; System . out . print ( GcdOfArray ( arr , 0 ) + "NEW_LINE"); int [ ] arr1 = { 2 , 4 , 6 , 8 } ; System . out . print ( GcdOfArray ( arr1 , 0 ) + "NEW_LINE"); } }