979871 ÷ 40 
We want to divide 979871 by 40.

Going ahead to step 1:
40 can be fit into 9 0 times, resulting in a remainder of 9.
The next digit of our result is 0. 
Result so far: 0.0
Subtracting 0 from 9 leaves us with 9.
Take the next digit (7) from the dividend and append it to 9, then repeat: 97 / 40

Moving on to step 2:
97 divided by 40 is 2 with a remainder of 17.
The number 2 becomes the next digit in our result. 
Result so far: 2.0
If we take 80 away from 97, we end up with 17.
Include the next digit (9) from the dividend after 17, then repeat: 179 / 40

Going ahead to step 3:
179 divided by 40 is 4 with a remainder of 19.
Write down 4 as next digit of the result. 
Result so far: 24.0
Subtract 160 from 179 to get 19.
Grab the next digit (8) from the dividend, add it to 19, then carry on: 198 / 40

Let's proceed to step 4:
When dividing 198 by 40, we get 4 with a remainder of 38.
Use 4 as the next digit of our solution. 
Result so far: 244.0
Deduct 160 from 198 and we're left with 38.
Fetch the next digit (7) from the dividend, attach it to 38 and continue: 387 / 40

Moving on to step 5:
The number 40 fits into 387 9 times, leaving a remainder of 27.
Write down 9 as next digit of the result. 
Result so far: 2449.0
Subtract 360 from 387 to get 27.
Take the next digit (1) from the dividend and append it to 27, then repeat: 271 / 40

Step 6:
The number 40 fits into 271 6 times, leaving a remainder of 31.
Write down 6 as next digit of the result. 
Result so far: 24496.0
The remainder is 31 after subtracting 240 from 271.
Since there are no more digits in the dividend, we add a zero to the remainder making it 310, and continue the process.

Moving on to step 7:
40 can be fit into 310 7 times, resulting in a remainder of 30.
The number 7 becomes the next digit in our result. 
Result so far: 24496.7
If we take 280 away from 310, we end up with 30.
Since there are no more digits in the dividend, we add a zero to the remainder making it 300, and continue the process.

Step 8:
The number 40 fits into 300 7 times, leaving a remainder of 20.
Write down 7 as next digit of the result. 
Result so far: 24496.77
The remainder is 20 after subtracting 280 from 300.
Since there are no more digits in the dividend, we add a zero to the remainder making it 200, and continue the process.

After the division, we end up with 24496.77 and a remainder of 0.02.