We look at the division of 360112 by 40 
The aim is to understand the frequency of 40 in 360112.

On to step 1:
40 goes into 3 0 times with a remainder of 3.
Use 0 as the next digit of our solution. 
Result so far: 0.0
If we take 0 away from 3, we end up with 3.
Fetch the next digit (6) from the dividend, attach it to 3 and continue: 36 / 40

Advancing to step 2:
40 goes into 36 0 times with a remainder of 36.
Write down 0 as next digit of the result. 
Result so far: 0.0
The remainder is 36 after subtracting 0 from 36.
Bring next digit (0) of the dividend behind the 36 and repeat the process: 360 / 40

On to step 3:
The number 40 fits into 360 9 times, leaving a remainder of 0.
Use 9 as the next digit of our solution. 
Result so far: 9.0
If we take 360 away from 360, we end up with 0.
Include the next digit (1) from the dividend after 0, then repeat: 1 / 40

Moving on to step 4:
The number 40 fits into 1 0 times, leaving a remainder of 1.
Record the quotient 0 as the next digit in the result. 
Result so far: 90.0
Subtracting 0 from 1 leaves us with 1.
Take the next digit (1) from the dividend and append it to 1, then repeat: 11 / 40

Going ahead to step 5:
40 goes into 11 0 times with a remainder of 11.
The next digit of our result is 0. 
Result so far: 900.0
The remainder is 11 after subtracting 0 from 11.
Bring next digit (2) of the dividend behind the 11 and repeat the process: 112 / 40

Going ahead to step 6:
The number 40 fits into 112 2 times, leaving a remainder of 32.
The next digit of our result is 2. 
Result so far: 9002.0
If we take 80 away from 112, we end up with 32.
Since there are no more digits in the dividend, we add a zero to the remainder making it 320, and continue the process.

Step 7:
When dividing 320 by 40, we get 8 with a remainder of 0.
Write down 8 as next digit of the result. 
Result so far: 9002.8
The remainder is 0 after subtracting 320 from 320.
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:
0 divided by 40 is 0 with a remainder of 0.
The number 0 becomes the next digit in our result. 
Result so far: 9002.8
The remainder is 0 after subtracting 0 from 0.
Since there are no more digits in the dividend, we add a zero to the remainder making it 0, and continue the process.

Step 9:
0 divided by 40 is 0 with a remainder of 0.
Record the quotient 0 as the next digit in the result. 
Result so far: 9002.8
Deduct 0 from 0 and we're left 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.

After the division, we end up with 9002.8 and a remainder of 0.0.