Question: Write a function that accepts as its input a single random number. Your function should use a while loop to repeatedly divide this number by
Write a function that accepts as its input a single random number. Your function should use a while loop to repeatedly divide this number by until the value remaining is less than The function should have two separate output values:
The value remaining which should be less than and
The number of divisions required.
Because the number of divisions required should be an integer, be sure to create it as an bit unsigned integer type variable to avoid any potential roundingarithmetic issues.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
