Create a loop and inside of it replace the larger integer


Question: You are required to do the subsequent:

- Part 1: Prompt the user to enter two integers and read them from the keyboard.

- Part 2: Create a loop, and inside of it replace the larger integer with the difference between the larger integer and the smaller integer (if the integers are equal you may choose either one as the "larger") during each iteration. You will need to use an if/else statement to determine the larger value.

- Part 3: Continue looping until the two integers are equal.

- Part 4: Print out the remaining value as the gcd. See the sample output below.

I'm not sure how to solve the question. Can anyone help me?

Request for Solution File

Ask an Expert for Answer!!
Programming Languages: Create a loop and inside of it replace the larger integer
Reference No:- TGS0947807

Expected delivery within 24 Hours