We're dividing 123797 by 5 
The aim is to understand the frequency of 5 in 123797.

Let's proceed to step 1:
When dividing 1 by 5, we get 0 with a remainder of 1.
Write down 0 as next digit of the result. 
Result so far: 0.0
The remainder is 1 after subtracting 0 from 1.
Bring next digit (2) of the dividend behind the 1 and repeat the process: 12 / 5

Step 2:
5 can be fit into 12 2 times, resulting in a remainder of 2.
Use 2 as the next digit of our solution. 
Result so far: 2.0
If we subtract 10 from 12, we get 2.
Bring next digit (3) of the dividend behind the 2 and repeat the process: 23 / 5

Let's proceed to step 3:
5 can be fit into 23 4 times, resulting in a remainder of 3.
Put 4 as the next digit of the answer. 
Result so far: 24.0
The remainder is 3 after subtracting 20 from 23.
Fetch the next digit (7) from the dividend, attach it to 3 and continue: 37 / 5

Let's proceed to step 4:
If we divide 37 by 5, we get 7 and a remainder of 2.
Use 7 as the next digit of our solution. 
Result so far: 247.0
If we take 35 away from 37, we end up with 2.
Append the next digit (9) from the dividend to 2 and continue with: 29 / 5

On to step 5:
The number 5 fits into 29 5 times, leaving a remainder of 4.
Record the quotient 5 as the next digit in the result. 
Result so far: 2475.0
The remainder is 4 after subtracting 25 from 29.
Take the next digit (7) from the dividend and append it to 4, then repeat: 47 / 5

Step 6:
5 can be fit into 47 9 times, resulting in a remainder of 2.
Write down 9 as next digit of the result. 
Result so far: 24759.0
If we subtract 45 from 47, we get 2.
Since there are no more digits in the dividend, we add a zero to the remainder making it 20, and continue the process.

On to step 7:
5 can be fit into 20 4 times, resulting in a remainder of 0.
Record the quotient 4 as the next digit in the result. 
Result so far: 24759.4
If we subtract 20 from 20, we get 0.
Since there are no more digits in the dividend, we add a zero to the remainder making it 0, and continue the process.

On to step 8:
If we divide 0 by 5, we get 0 and a remainder of 0.
Put 0 as the next digit of the answer. 
Result so far: 24759.4
Subtracting 0 from 0 leaves us with 0.
Since there are no more digits in the dividend, we add a zero to the remainder making it 0, and continue the process.

Going ahead to step 9:
If we divide 0 by 5, we get 0 and a remainder of 0.
Use 0 as the next digit of our solution. 
Result so far: 24759.4
Subtracting 0 from 0 leaves us with 0.
Since there are no more digits in the dividend, we add a zero to the remainder making it 0, and continue the process.

Our division results in 24759.4 with a remaining 0.0.