We're dividing 587238 by 40 
Let's see how many times 40 fits into 587238.

Going ahead to step 1:
The number 40 fits into 5 0 times, leaving a remainder of 5.
Record the quotient 0 as the next digit in the result. 
Result so far: 0.0
If we take 0 away from 5, we end up with 5.
Fetch the next digit (8) from the dividend, attach it to 5 and continue: 58 / 40

On to step 2:
40 goes into 58 1 times with a remainder of 18.
Write down 1 as next digit of the result. 
Result so far: 1.0
If we take 40 away from 58, we end up with 18.
Append the next digit (7) from the dividend to 18 and continue with: 187 / 40

On to step 3:
40 goes into 187 4 times with a remainder of 27.
Put 4 as the next digit of the answer. 
Result so far: 14.0
Subtract 160 from 187 to get 27.
Fetch the next digit (2) from the dividend, attach it to 27 and continue: 272 / 40

On to step 4:
When dividing 272 by 40, we get 6 with a remainder of 32.
Use 6 as the next digit of our solution. 
Result so far: 146.0
The remainder is 32 after subtracting 240 from 272.
Take the next digit (3) from the dividend and append it to 32, then repeat: 323 / 40

Moving on to step 5:
40 goes into 323 8 times with a remainder of 3.
Write down 8 as next digit of the result. 
Result so far: 1468.0
Subtracting 320 from 323 leaves us with 3.
Take the next digit (8) from the dividend and append it to 3, then repeat: 38 / 40

Advancing to step 6:
If we divide 38 by 40, we get 0 and a remainder of 38.
The number 0 becomes the next digit in our result. 
Result so far: 14680.0
Subtracting 0 from 38 leaves us with 38.
Since there are no more digits in the dividend, we add a zero to the remainder making it 380, and continue the process.

Step 7:
When dividing 380 by 40, we get 9 with a remainder of 20.
Use 9 as the next digit of our solution. 
Result so far: 14680.9
Subtract 360 from 380 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.

Step 8:
If we divide 200 by 40, we get 5 and a remainder of 0.
Put 5 as the next digit of the answer. 
Result so far: 14680.95
If we subtract 200 from 200, 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 9:
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: 14680.95
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.

Going ahead to step 10:
0 divided by 40 is 0 with a remainder of 0.
The next digit of our result is 0. 
Result so far: 14680.95
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.

The quotient of the division is 14680.95, and the remainder is 0.0.