Write a program that continually displays the greatest common divisor (GCD)….solved

$14.99

Original Work ?
Category: You will Instantly receive a download link for .ZIP solution file upon Payment

Description

5/5 - (1 vote)

Write a program that continually displays the greatest common divisor (GCD) and least commonmultiple (LCM) of the absolute values of two (2) integers until the inputs of the users are both(0).For this project create the following functions:◦int abs(int value);This function returns the absolute value of the parametervalue.◦int gcd(int x,int y);This function returns the GCD of parametersxancy.◦int lcm(int x,int y);This function returns the LCM of parametersxancy.Hint: The LCM is the first number that is a multiple of two numbers.In the main, prompt the user to enter in two (2) integers; and then, display the GCD and LCMof the absolute values of the numbers. Continually do so until the users enters zero (0) for bothnumbers.

Project ScoringTaskPointsfunctioningabs()function15 ptsfunctioninggcd()function30 ptsfunctioninglcm()function30 ptsmain()function loop15 ptscompiling pro-gram10 ptsTotal100 pts