799871 divided by 9 
The aim is to understand the frequency of 9 in 799871.

Let's proceed to step 1:
If we divide 7 by 9, we get 0 and a remainder of 7.
Put 0 as the next digit of the answer. 
Result so far: 0.0
Deduct 0 from 7 and we're left with 7.
Bring next digit (9) of the dividend behind the 7 and repeat the process: 79 / 9

Let's proceed to step 2:
When dividing 79 by 9, we get 8 with a remainder of 7.
The number 8 becomes the next digit in our result. 
Result so far: 8.0
If we subtract 72 from 79, we get 7.
Take the next digit (9) from the dividend and append it to 7, then repeat: 79 / 9

On to step 3:
79 divided by 9 is 8 with a remainder of 7.
Write down 8 as next digit of the result. 
Result so far: 88.0
If we take 72 away from 79, we end up with 7.
Take the next digit (8) from the dividend and append it to 7, then repeat: 78 / 9

On to step 4:
9 goes into 78 8 times with a remainder of 6.
Put 8 as the next digit of the answer. 
Result so far: 888.0
Subtract 72 from 78 to get 6.
Fetch the next digit (7) from the dividend, attach it to 6 and continue: 67 / 9

Let's proceed to step 5:
9 goes into 67 7 times with a remainder of 4.
Write down 7 as next digit of the result. 
Result so far: 8887.0
If we subtract 63 from 67, we get 4.
Take the next digit (1) from the dividend and append it to 4, then repeat: 41 / 9

Advancing to step 6:
41 divided by 9 is 4 with a remainder of 5.
The next digit of our result is 4. 
Result so far: 88874.0
Subtracting 36 from 41 leaves us with 5.
Since there are no more digits in the dividend, we add a zero to the remainder making it 50, and continue the process.

On to step 7:
When dividing 50 by 9, we get 5 with a remainder of 5.
Write down 5 as next digit of the result. 
Result so far: 88874.5
Subtract 45 from 50 to get 5.
Since there are no more digits in the dividend, we add a zero to the remainder making it 50, and continue the process.

Let's proceed to step 8:
9 goes into 50 5 times with a remainder of 5.
Put 5 as the next digit of the answer. 
Result so far: 88874.55
If we take 45 away from 50, we end up with 5.
Since there are no more digits in the dividend, we add a zero to the remainder making it 50, and continue the process.

Our division results in 88874.55 with a remaining 0.005.