Let's divide 40517 by 18
Let's see how many times 18 fits into 40517.

Moving on to step 1:
18 can be fit into 4 0 times, resulting in a remainder of 4.
Put 0 as the next digit of the answer. 
Result so far: 0.0
Deduct 0 from 4 and we're left with 4.
Bring next digit (0) of the dividend behind the 4 and repeat the process: 40 / 18

Let's proceed to step 2:
The number 18 fits into 40 2 times, leaving a remainder of 4.
Use 2 as the next digit of our solution. 
Result so far: 2.0
Deduct 36 from 40 and we're left with 4.
Fetch the next digit (5) from the dividend, attach it to 4 and continue: 45 / 18

Advancing to step 3:
18 can be fit into 45 2 times, resulting in a remainder of 9.
The number 2 becomes the next digit in our result. 
Result so far: 22.0
Deduct 36 from 45 and we're left with 9.
Fetch the next digit (1) from the dividend, attach it to 9 and continue: 91 / 18

Step 4:
If we divide 91 by 18, we get 5 and a remainder of 1.
Write down 5 as next digit of the result. 
Result so far: 225.0
Subtract 90 from 91 to get 1.
Grab the next digit (7) from the dividend, add it to 1, then carry on: 17 / 18

On to step 5:
18 can be fit into 17 0 times, resulting in a remainder of 17.
Put 0 as the next digit of the answer. 
Result so far: 2250.0
If we subtract 0 from 17, we get 17.
Since there are no more digits in the dividend, we add a zero to the remainder making it 170, and continue the process.

Let's proceed to step 6:
When dividing 170 by 18, we get 9 with a remainder of 8.
Use 9 as the next digit of our solution. 
Result so far: 2250.9
If we subtract 162 from 170, we get 8.
Since there are no more digits in the dividend, we add a zero to the remainder making it 80, and continue the process.

On to step 7:
The number 18 fits into 80 4 times, leaving a remainder of 8.
Use 4 as the next digit of our solution. 
Result so far: 2250.94
Deduct 72 from 80 and we're left with 8.
Since there are no more digits in the dividend, we add a zero to the remainder making it 80, and continue the process.

On to step 8:
The number 18 fits into 80 4 times, leaving a remainder of 8.
Put 4 as the next digit of the answer. 
Result so far: 2250.944
Subtract 72 from 80 to get 8.
Since there are no more digits in the dividend, we add a zero to the remainder making it 80, and continue the process.

The final result is 2250.944 with a remainder of 0.0008.