Question: IN C + + Write ( on paper ) the code for a RECURSIVE function called 'Icm' that: a . Takes two unsigned integers a

IN C++ Write (on paper) the code for a RECURSIVE function called 'Icm' that:
a. Takes two unsigned integers a and b as input.
b. Returns an array of two unsigned integers z and n as output where z is the least common
multiple of a and b and n is the count of recursions needed to calculate z.
c. Does any error checking or throws any exception as may be needed.
A least common multiple z is the lowest number which can be fully divided by both inputs a
and b without leaving a remainder.
Then write the output of your function for the following two cases:
(i)a=97,b=311
(ii)a=77777,b=67890
You can write a program to figure out your function and test it appropriately as well as
provide the output of the two test cases.
Remember - this Q needs only the code of the function as well as the output of the two
test cases - on paper.
 IN C++ Write (on paper) the code for a RECURSIVE function

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!