Who Needs 3's, 6's, or 9's?!!
This challenge is based on the following tweet:
Write a program that prompts for the maximum number of digits to (
max_digits) be used in each of the numerator and the denominator, then randomly create a fraction with that number of digits. Let's call this the
Now add at least
max_digits 3's, 6's, or 9's randomly to each of the numerator and denominator, as shown in the diagram above. Let's call this the
Now compare the quotient of both the
simple_fraction and the
complex_fraction. If they are the same, output "They are the same!". If they are different, output "The quotients are _____ and _____ so they are not the same!", where the underscores are
complex_fraction rounded to 5 decimal places, in that order.