We look at the division of 791738 by 40 
Let's see how many times 40 fits into 791738.

Going ahead to step 1:
The number 40 fits into 7 0 times, leaving a remainder of 7.
Put 0 as the next digit of the answer. 
Result so far: 0.0
Subtract 0 from 7 to get 7.
Fetch the next digit (9) from the dividend, attach it to 7 and continue: 79 / 40

Advancing to step 2:
40 can be fit into 79 1 times, resulting in a remainder of 39.
The number 1 becomes the next digit in our result. 
Result so far: 1.0
If we subtract 40 from 79, we get 39.
Append the next digit (1) from the dividend to 39 and continue with: 391 / 40

Advancing to step 3:
40 goes into 391 9 times with a remainder of 31.
Record the quotient 9 as the next digit in the result. 
Result so far: 19.0
Deduct 360 from 391 and we're left with 31.
Grab the next digit (7) from the dividend, add it to 31, then carry on: 317 / 40

Going ahead to step 4:
The number 40 fits into 317 7 times, leaving a remainder of 37.
The number 7 becomes the next digit in our result. 
Result so far: 197.0
Subtract 280 from 317 to get 37.
Bring next digit (3) of the dividend behind the 37 and repeat the process: 373 / 40

Going ahead to step 5:
40 can be fit into 373 9 times, resulting in a remainder of 13.
Put 9 as the next digit of the answer. 
Result so far: 1979.0
Subtracting 360 from 373 leaves us with 13.
Take the next digit (8) from the dividend and append it to 13, then repeat: 138 / 40

Let's proceed to step 6:
138 divided by 40 is 3 with a remainder of 18.
Write down 3 as next digit of the result. 
Result so far: 19793.0
Deduct 120 from 138 and we're left with 18.
Since there are no more digits in the dividend, we add a zero to the remainder making it 180, and continue the process.

Going ahead to step 7:
40 goes into 180 4 times with a remainder of 20.
The next digit of our result is 4. 
Result so far: 19793.4
The remainder is 20 after subtracting 160 from 180.
Since there are no more digits in the dividend, we add a zero to the remainder making it 200, and continue the process.

Advancing to step 8:
200 divided by 40 is 5 with a remainder of 0.
The number 5 becomes the next digit in our result. 
Result so far: 19793.45
Subtract 200 from 200 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.

Step 9:
0 divided by 40 is 0 with a remainder of 0.
The next digit of our result is 0. 
Result so far: 19793.45
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 10:
If we divide 0 by 40, we get 0 and a remainder of 0.
The number 0 becomes the next digit in our result. 
Result so far: 19793.45
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 final outcome is 19793.45, with a leftover of 0.0.