Let's divide 540058 by 40
Let's see how many times 40 fits into 540058.

Going ahead to step 1:
When dividing 5 by 40, we get 0 with a remainder of 5.
The number 0 becomes the next digit in our result. 
Result so far: 0.0
Deduct 0 from 5 and we're left with 5.
Bring next digit (4) of the dividend behind the 5 and repeat the process: 54 / 40

On to step 2:
If we divide 54 by 40, we get 1 and a remainder of 14.
Use 1 as the next digit of our solution. 
Result so far: 1.0
The remainder is 14 after subtracting 40 from 54.
Bring next digit (0) of the dividend behind the 14 and repeat the process: 140 / 40

Going ahead to step 3:
If we divide 140 by 40, we get 3 and a remainder of 20.
Write down 3 as next digit of the result. 
Result so far: 13.0
The remainder is 20 after subtracting 120 from 140.
Append the next digit (0) from the dividend to 20 and continue with: 200 / 40

Moving on to step 4:
The number 40 fits into 200 5 times, leaving a remainder of 0.
The number 5 becomes the next digit in our result. 
Result so far: 135.0
Subtract 200 from 200 to get 0.
Append the next digit (5) from the dividend to 0 and continue with: 5 / 40

Moving on to step 5:
When dividing 5 by 40, we get 0 with a remainder of 5.
The next digit of our result is 0. 
Result so far: 1350.0
Subtract 0 from 5 to get 5.
Fetch the next digit (8) from the dividend, attach it to 5 and continue: 58 / 40

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

Going ahead to step 7:
When dividing 180 by 40, we get 4 with a remainder of 20.
Write down 4 as next digit of the result. 
Result so far: 13501.4
Subtract 160 from 180 to get 20.
Since there are no more digits in the dividend, we add a zero to the remainder making it 200, and continue the process.

Let's proceed to step 8:
40 goes into 200 5 times with a remainder of 0.
Write down 5 as next digit of the result. 
Result so far: 13501.45
If we take 200 away from 200, 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.

Moving on to step 9:
40 goes into 0 0 times with a remainder of 0.
The next digit of our result is 0. 
Result so far: 13501.45
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.

Let's proceed to step 10:
The number 40 fits into 0 0 times, leaving a remainder of 0.
The number 0 becomes the next digit in our result. 
Result so far: 13501.45
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.

Our division results in 13501.45 with a remaining 0.0.