How do you write repeating decimals as fractions?

There's directions in my book,but I don't understand it?
For example, how would you write as a fraction 0.81 with the 81 repeating?

multiply the .818181818 by 100.

81.818181818
Now subtract the originalnumber, and get
81
but that is 99 of the original.

81/99 is the equivalent fraction

Now figure out why I multiplied by 100.
What would I have multiplied by if the repeating number were .345345345?

To write a repeating decimal as a fraction, you can follow these steps:

1. Let x be the repeating decimal.
2. Multiply x by a power of 10 that moves the decimal point to just before the repeating part. In this case, you would multiply 0.81 by 100 to get 81.
3. Subtract x from the result obtained in step 2 to eliminate the repeating part:

81 - 0.81 = 80.19

4. Determine the number of nines to use in the denominator of the fraction. For every repeating digit in the repeating part, use one nine in the denominator. In this case, the repeating part contains two digits (81), so you would use two nines (99).

Fraction = (Difference from step 3) / (Number of nines in the denominator)

Fraction = 80.19 / 99

5. Simplify the fraction if possible. In this case, the fraction is already in its simplest form.

So the fraction representation of 0.81 with the 81 repeating is 80.19/99.

Remember to apply these steps for any repeating decimal you want to convert to a fraction.