Ed Sessive scribbles wildly in his notebook. He's just realized that every rational number's decimal expansion must repeat. He's also just realized that his pen is almost out of ink. He doesn't want to stop playing with his new discovery. And there's someone with a computer sitting just a few feet away.The first thing you notice is a loud rustling of paper. You worry, knowing Ed's tendency to become obsessive. You look over and see him walking towards you, his hands stretched towards your laptop. You state firmly, "Um, no." He looks as if you've stabbed him with a nasty knife and he's going to die very slowly and miserably at your feet. You give up and ask what he wants. It sounds simple enough...
Each fraction will repeat within the first 100 digits of its expansion.
And no, you don't have to have the pluralization correct.
Example 2:
Enter a numerator and a denominator: 12 13
Repeating digits: 923076
Example 3:
Enter a numerator and a denominator: 11 42
Repeating digits: 619047
Example 5:
Enter a numerator and a denominator: 11 16
Repeating digit: 0
Example 6:
Enter a numerator and a denominator: 17 19
Repeating digits: 894736842105263157
Example 7:
Enter a numerator and a denominator: 1 103
Repeating digits: 0097087378640776699029126213592233
Example 8:
Enter a numerator and a denominator: 96 97
Repeating digits: 989690721649484536082474226804123711340206185567010309278350515463917525773195876288659793814432