Question: Please do both they are related. In c++ with function I ask before they do it in java. I need in c++. mICaingies, but we
mICaingies, but we can use any two integers. EXERCISES Exercise 5.4.1. Revise the program so that it prints out all the steps involved in the algorithm. Here is a sample output GCF (500, 300) > GCF(300, 200) => GCF (200, 100) GCF (100, 0) 100 Exercise 5.4.2. For experts: Revise the gcf function so that it uses an iterative (loop- proach. Each cycle through the loop should stop if B is zero; otherwise, it based) ap should set new values for A and B and then continue. You'll need a temporary variable-temp-to hold the old value of B for a couple of!ines: temp-b, b a%b, and a = temp
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
