Write a program that reads a decimal expansion with a repeated part, as in Exercise P5.16, and

Question:

Write a program that reads a decimal expansion with a repeated part, as in Exercise P5.16, and displays the fraction that it represents.

Data from Exercise P5.16,

Write a program that prints the decimal expansion of a fraction, marking the repeated part with an R. For example, 5/2 is 2.5R0, 1/12 is 0.08R3, and 1/7 is 0.R142857.

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question
Question Posted: