788842 ÷ 40 
We want to figure out the number of times 788842 can be divided by 40.

On to step 1:
7 divided by 40 is 0 with a remainder of 7.
Use 0 as the next digit of our solution. 
Result so far: 0.0
Subtracting 0 from 7 leaves us with 7.
Include the next digit (8) from the dividend after 7, then repeat: 78 / 40

Advancing to step 2:
40 goes into 78 1 times with a remainder of 38.
The next digit of our result is 1. 
Result so far: 1.0
Subtracting 40 from 78 leaves us with 38.
Take the next digit (8) from the dividend and append it to 38, then repeat: 388 / 40

On to step 3:
388 divided by 40 is 9 with a remainder of 28.
Use 9 as the next digit of our solution. 
Result so far: 19.0
If we take 360 away from 388, we end up with 28.
Fetch the next digit (8) from the dividend, attach it to 28 and continue: 288 / 40

Advancing to step 4:
The number 40 fits into 288 7 times, leaving a remainder of 8.
Put 7 as the next digit of the answer. 
Result so far: 197.0
If we take 280 away from 288, we end up with 8.
Grab the next digit (4) from the dividend, add it to 8, then carry on: 84 / 40

On to step 5:
When dividing 84 by 40, we get 2 with a remainder of 4.
Use 2 as the next digit of our solution. 
Result so far: 1972.0
The remainder is 4 after subtracting 80 from 84.
Append the next digit (2) from the dividend to 4 and continue with: 42 / 40

On to step 6:
40 goes into 42 1 times with a remainder of 2.
Write down 1 as next digit of the result. 
Result so far: 19721.0
Deduct 40 from 42 and we're left with 2.
Since there are no more digits in the dividend, we add a zero to the remainder making it 20, and continue the process.

Advancing to step 7:
40 can be fit into 20 0 times, resulting in a remainder of 20.
The next digit of our result is 0. 
Result so far: 19721.0
If we subtract 0 from 20, we 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.

Moving on to step 8:
When dividing 200 by 40, we get 5 with a remainder of 0.
The number 5 becomes the next digit in our result. 
Result so far: 19721.05
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.

Moving on to step 9:
40 goes into 0 0 times with a remainder of 0.
Put 0 as the next digit of the answer. 
Result so far: 19721.05
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.

Step 10:
When dividing 0 by 40, we get 0 with a remainder of 0.
Write down 0 as next digit of the result. 
Result so far: 19721.05
If we subtract 0 from 0, 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.

Our division results in 19721.05 with a remaining 0.0.