This is a Python Program to find the GCD of two numbers.

The program takes two numbers and prints the GCD of two numbers.

1. Import the fractions module.

2. Take in both the integers and store it in separate variables.

3. Use the in-built function to find the GCD of both the numbers.

4. Print the GCD.

5. Exit.

Here is source code of the Python Program to find the GCD of two numbers. The program output is also shown below.

import fractions a=int(input("Enter the first number:")) b=int(input("Enter the second number:")) print("The GCD of the two numbers is",fractions.gcd(a,b))

1. Import the fractions module.

2. User must enter both the numbers and store it in separate variables.

3. The in-built function of fractions.gcd(a,b) is used where a and b are the variables containing the integer values.

4. The final GCD is printed.

Case 1: Enter the first number:15 Enter the second number:5 The GCD of the two numbers is 5 Case 2: Enter the first number:105 Enter the second number:222 The GCD of the two numbers is 3

**Sanfoundry Global Education & Learning Series – Python Programs.**

To practice all Python programs, __here is complete set of 150+ Python Problems and Solutions__.