We look at the division of 645340 by 40 
Let's see how many times 40 fits into 645340.

Moving on to step 1:
40 goes into 6 0 times with a remainder of 6.
Put 0 as the next digit of the answer. 
Result so far: 0.0
Subtract 0 from 6 to get 6.
Bring next digit (4) of the dividend behind the 6 and repeat the process: 64 / 40

Advancing to step 2:
The number 40 fits into 64 1 times, leaving a remainder of 24.
Record the quotient 1 as the next digit in the result. 
Result so far: 1.0
Deduct 40 from 64 and we're left with 24.
Take the next digit (5) from the dividend and append it to 24, then repeat: 245 / 40

On to step 3:
40 can be fit into 245 6 times, resulting in a remainder of 5.
The number 6 becomes the next digit in our result. 
Result so far: 16.0
Subtracting 240 from 245 leaves us with 5.
Grab the next digit (3) from the dividend, add it to 5, then carry on: 53 / 40

Advancing to step 4:
40 goes into 53 1 times with a remainder of 13.
Write down 1 as next digit of the result. 
Result so far: 161.0
If we take 40 away from 53, we end up with 13.
Take the next digit (4) from the dividend and append it to 13, then repeat: 134 / 40

Moving on to step 5:
40 goes into 134 3 times with a remainder of 14.
The next digit of our result is 3. 
Result so far: 1613.0
Subtract 120 from 134 to get 14.
Append the next digit (0) from the dividend to 14 and continue with: 140 / 40

On to step 6:
140 divided by 40 is 3 with a remainder of 20.
Use 3 as the next digit of our solution. 
Result so far: 16133.0
The remainder is 20 after subtracting 120 from 140.
Since there are no more digits in the dividend, we add a zero to the remainder making it 200, and continue the process.

Moving on to step 7:
If we divide 200 by 40, we get 5 and a remainder of 0.
Record the quotient 5 as the next digit in the result. 
Result so far: 16133.5
Subtracting 200 from 200 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.

Moving on to step 8:
When dividing 0 by 40, we get 0 with a remainder of 0.
Put 0 as the next digit of the answer. 
Result so far: 16133.5
Subtract 0 from 0 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.

Advancing to step 9:
The number 40 fits into 0 0 times, leaving a remainder of 0.
The next digit of our result is 0. 
Result so far: 16133.5
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.

The final result is 16133.5 with a remainder of 0.0.