##
Print the kth common factor of two numbers
January 20, 2017

Given three numbers x, y and k, find the k’th common factor of x and y. Print -1 if there are less than k common factors of x and y. Examples: Input : x = 20, y = 24 k = 3 Output : 4 Common factors are 1, 2, 4, … Input : x… Read More »