Let's divide 965047 by 40
We want to figure out the number of times 965047 can be divided by 40.

Moving on to step 1:
When dividing 9 by 40, we get 0 with a remainder of 9.
Put 0 as the next digit of the answer. 
Result so far: 0.0
Subtracting 0 from 9 leaves us with 9.
Take the next digit (6) from the dividend and append it to 9, then repeat: 96 / 40

Going ahead to step 2:
96 divided by 40 is 2 with a remainder of 16.
The next digit of our result is 2. 
Result so far: 2.0
If we take 80 away from 96, we end up with 16.
Fetch the next digit (5) from the dividend, attach it to 16 and continue: 165 / 40

Let's proceed to step 3:
When dividing 165 by 40, we get 4 with a remainder of 5.
Use 4 as the next digit of our solution. 
Result so far: 24.0
Subtracting 160 from 165 leaves us with 5.
Grab the next digit (0) from the dividend, add it to 5, then carry on: 50 / 40

Let's proceed to step 4:
50 divided by 40 is 1 with a remainder of 10.
The next digit of our result is 1. 
Result so far: 241.0
Subtracting 40 from 50 leaves us with 10.
Fetch the next digit (4) from the dividend, attach it to 10 and continue: 104 / 40

Going ahead to step 5:
If we divide 104 by 40, we get 2 and a remainder of 24.
Write down 2 as next digit of the result. 
Result so far: 2412.0
If we subtract 80 from 104, we get 24.
Append the next digit (7) from the dividend to 24 and continue with: 247 / 40

Going ahead to step 6:
40 goes into 247 6 times with a remainder of 7.
The number 6 becomes the next digit in our result. 
Result so far: 24126.0
If we take 240 away from 247, we end up with 7.
Since there are no more digits in the dividend, we add a zero to the remainder making it 70, and continue the process.

Going ahead to step 7:
40 can be fit into 70 1 times, resulting in a remainder of 30.
Write down 1 as next digit of the result. 
Result so far: 24126.1
If we take 40 away from 70, we end up with 30.
Since there are no more digits in the dividend, we add a zero to the remainder making it 300, and continue the process.

On to step 8:
40 can be fit into 300 7 times, resulting in a remainder of 20.
The next digit of our result is 7. 
Result so far: 24126.17
If we take 280 away from 300, we end up with 20.
Since there are no more digits in the dividend, we add a zero to the remainder making it 200, and continue the process.

Step 9:
200 divided by 40 is 5 with a remainder of 0.
Put 5 as the next digit of the answer. 
Result so far: 24126.175
Subtract 200 from 200 to 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.

Let's proceed to step 10:
40 goes into 0 0 times with a remainder of 0.
Record the quotient 0 as the next digit in the result. 
Result so far: 24126.175
If we take 0 away from 0, we end up 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.

On to step 11:
0 divided by 40 is 0 with a remainder of 0.
Use 0 as the next digit of our solution. 
Result so far: 24126.175
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.

In conclusion, the division gives 24126.175 with a balance of 0.0.