8=2+2+2+2= multiplying gives = 16highest factor in addition. 4= 2+2 = multiply = 4 9 = 3+3+3 = multiply = 27its greater common factor Input_1:Enter…
A chocolate factory is packing chocolates into the packets. The chocolate packets here represent an array arrt of N number of integer values. The task…