Module: GCD (Greatest Common Divisor)


Problem

3/10

Recursive GCD: Beginning (C++)

Problem

Two natural numbers A and B are given. It is required to find their greatest common divisor.
 
Input
Enter two natural numbers A and B (\(A, B <= 10^9\)) .
 
Output 
It is required to output GCD A and B.

Paste the missing piece of code into the program.

Examples
# Input Output
1 12 42 6