GCD of digits of a given number
Given a number n, find GCD of its digits. Examples : Input : 345 Output : 1 GCD of 3, 4 and 5 is 1. Input : 2448 Output : 2 GCD of 2, 4, 4 and 8 is 2 We traverse the digits of number one by one using below loop digit = n mod 10; n = n / 10; While traversing digits, we keep track of current GCD and k