Levels Tought:
Elementary,Middle School,High School,College,University,PHD
Teaching Since: | Apr 2017 |
Last Sign in: | 8 Weeks Ago, 5 Days Ago |
Questions Answered: | 4870 |
Tutorials Posted: | 4863 |
MBA IT, Mater in Science and Technology
Devry
Jul-1996 - Jul-2000
Professor
Devry University
Mar-2010 - Oct-2016
I need solution for my C++ Assignment. I need the source code and output for the assignment.
ProjectName:Submit the source code and the output(s)GCD and LCMWrite 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.
Attachments:-----------