Question: using python please, ... need to be working on pycharm Question: Greatest Common Factor In mathematics, the greatest common factor (GCF), also known as the

Question: Greatest Common Factor In mathematics, the greatest common factor (GCF), also known as the greatest common divisor, of two (or more) non-zero integers a and b, is the largest positive integer by which both integers can be divided. It is commonly denoted as GCF(a,b). For example GCF(12,16)=4. Factors of 12:12 3, 6, 12 Factors of 16: 124 48, 16 Common Factors 4 is the Greatest Common Factor Write a Python program that will get two numbers from the user (a, b), find and display all the factors for both numbers, find and display the GCF of the two numbers. You should use loops to find the GCF (do not user built-in functions). Sample Input: a = 12 b=30 Sample Output: Factors of 12: 1, 2, 3, 4, 6, 12 Factors of 30: 1, 2, 3, 5, 6, 10, 15, 30 Greatest Common Factor: 6
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
