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

Step 1:
When dividing 7 by 40, we get 0 with a remainder of 7.
Put 0 as the next digit of the answer. 
Result so far: 0.0
If we subtract 0 from 7, we get 7.
Fetch the next digit (9) from the dividend, attach it to 7 and continue: 79 / 40

Going ahead to step 2:
40 goes into 79 1 times with a remainder of 39.
The next digit of our result is 1. 
Result so far: 1.0
If we subtract 40 from 79, we get 39.
Fetch the next digit (9) from the dividend, attach it to 39 and continue: 399 / 40

Advancing to step 3:
The number 40 fits into 399 9 times, leaving a remainder of 39.
The number 9 becomes the next digit in our result. 
Result so far: 19.0
Deduct 360 from 399 and we're left with 39.
Include the next digit (3) from the dividend after 39, then repeat: 393 / 40

On to step 4:
The number 40 fits into 393 9 times, leaving a remainder of 33.
Use 9 as the next digit of our solution. 
Result so far: 199.0
Deduct 360 from 393 and we're left with 33.
Fetch the next digit (1) from the dividend, attach it to 33 and continue: 331 / 40

Moving on to step 5:
331 divided by 40 is 8 with a remainder of 11.
Write down 8 as next digit of the result. 
Result so far: 1998.0
If we take 320 away from 331, we end up with 11.
Take the next digit (2) from the dividend and append it to 11, then repeat: 112 / 40

On to step 6:
If we divide 112 by 40, we get 2 and a remainder of 32.
Use 2 as the next digit of our solution. 
Result so far: 19982.0
Subtracting 80 from 112 leaves us with 32.
Since there are no more digits in the dividend, we add a zero to the remainder making it 320, and continue the process.

On to step 7:
40 can be fit into 320 8 times, resulting in a remainder of 0.
Put 8 as the next digit of the answer. 
Result so far: 19982.8
Deduct 320 from 320 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 8:
0 divided by 40 is 0 with a remainder of 0.
Record the quotient 0 as the next digit in the result. 
Result so far: 19982.8
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.

Step 9:
40 can be fit into 0 0 times, resulting in a remainder of 0.
The next digit of our result is 0. 
Result so far: 19982.8
Subtract 0 from 0 to 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.

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