Question: Write a programmer-defined void function called GCF() that takes in 2 integers, finds the greatest common factor of the integers and displays the result as
Write a programmer-defined void function called GCF() that takes in 2 integers, finds the greatest common factor of the integers and displays the result as shown in the test cases. 2. Test GCF() in your main program by prompting the user for 2 integers and printing out the result. Note: Your program must ask the user if they want to find another GCF (y), repeat the program until they enter 'n', and then exit with Thank you for usi
ng the program, goodbye! as shown in th
Test cases Enter two integers, separated by a space: 30 12 GCF of 30 and 12 is 6 Would you like to find another GCF? (y) y Enter two integers, separated by a space: 16 28 GCF of 16 and 28 is 4 Would you like to find another GCF? (y) y Enter two integers, separated by a space: 88 53 GCF of 88 and 53 is 1 Would you like to find another GCF? (y) n Thank you for using the program, goodbye
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
