Let's divide 996017 by 40
Our goal is to divide 996017 by 40.

Let's proceed to step 1:
40 can be fit into 9 0 times, resulting in a remainder of 9.
Put 0 as the next digit of the answer. 
Result so far: 0.0
If we subtract 0 from 9, we get 9.
Fetch the next digit (9) from the dividend, attach it to 9 and continue: 99 / 40

Let's proceed to step 2:
The number 40 fits into 99 2 times, leaving a remainder of 19.
Put 2 as the next digit of the answer. 
Result so far: 2.0
If we take 80 away from 99, we end up with 19.
Append the next digit (6) from the dividend to 19 and continue with: 196 / 40

Let's proceed to step 3:
If we divide 196 by 40, we get 4 and a remainder of 36.
The number 4 becomes the next digit in our result. 
Result so far: 24.0
Subtracting 160 from 196 leaves us with 36.
Take the next digit (0) from the dividend and append it to 36, then repeat: 360 / 40

Let's proceed to step 4:
If we divide 360 by 40, we get 9 and a remainder of 0.
Use 9 as the next digit of our solution. 
Result so far: 249.0
Deduct 360 from 360 and we're left with 0.
Append the next digit (1) from the dividend to 0 and continue with: 1 / 40

Let's proceed to step 5:
If we divide 1 by 40, we get 0 and a remainder of 1.
Use 0 as the next digit of our solution. 
Result so far: 2490.0
Deduct 0 from 1 and we're left with 1.
Append the next digit (7) from the dividend to 1 and continue with: 17 / 40

Advancing to step 6:
The number 40 fits into 17 0 times, leaving a remainder of 17.
The number 0 becomes the next digit in our result. 
Result so far: 24900.0
Subtracting 0 from 17 leaves us with 17.
Since there are no more digits in the dividend, we add a zero to the remainder making it 170, and continue the process.

Advancing to step 7:
40 goes into 170 4 times with a remainder of 10.
Put 4 as the next digit of the answer. 
Result so far: 24900.4
Deduct 160 from 170 and we're left with 10.
Since there are no more digits in the dividend, we add a zero to the remainder making it 100, and continue the process.

Moving on to step 8:
If we divide 100 by 40, we get 2 and a remainder of 20.
The number 2 becomes the next digit in our result. 
Result so far: 24900.42
Subtracting 80 from 100 leaves us 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.

Moving on to step 9:
When dividing 200 by 40, we get 5 with a remainder of 0.
Write down 5 as next digit of the result. 
Result so far: 24900.425
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 10:
0 divided by 40 is 0 with a remainder of 0.
Use 0 as the next digit of our solution. 
Result so far: 24900.425
Subtracting 0 from 0 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.

On to step 11:
The number 40 fits into 0 0 times, leaving a remainder of 0.
Record the quotient 0 as the next digit in the result. 
Result so far: 24900.425
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.

After the division, we end up with 24900.425 and a remainder of 0.0.