Let's divide 790380 by 40
Let's see how many times 40 fits into 790380.

Advancing to step 1:
7 divided by 40 is 0 with a remainder of 7.
The number 0 becomes the next digit in our result. 
Result so far: 0.0
Subtracting 0 from 7 leaves us with 7.
Include the next digit (9) from the dividend after 7, then repeat: 79 / 40

Going ahead to step 2:
When dividing 79 by 40, we get 1 with a remainder of 39.
The number 1 becomes the next digit in our result. 
Result so far: 1.0
The remainder is 39 after subtracting 40 from 79.
Grab the next digit (0) from the dividend, add it to 39, then carry on: 390 / 40

Let's proceed to step 3:
When dividing 390 by 40, we get 9 with a remainder of 30.
The number 9 becomes the next digit in our result. 
Result so far: 19.0
If we take 360 away from 390, we end up with 30.
Grab the next digit (3) from the dividend, add it to 30, then carry on: 303 / 40

Moving on to step 4:
40 can be fit into 303 7 times, resulting in a remainder of 23.
Write down 7 as next digit of the result. 
Result so far: 197.0
Subtract 280 from 303 to get 23.
Grab the next digit (8) from the dividend, add it to 23, then carry on: 238 / 40

Moving on to step 5:
40 can be fit into 238 5 times, resulting in a remainder of 38.
Use 5 as the next digit of our solution. 
Result so far: 1975.0
If we take 200 away from 238, we end up with 38.
Bring next digit (0) of the dividend behind the 38 and repeat the process: 380 / 40

Step 6:
40 goes into 380 9 times with a remainder of 20.
Record the quotient 9 as the next digit in the result. 
Result so far: 19759.0
Deduct 360 from 380 and we're left 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.

Going ahead to step 7:
40 goes into 200 5 times with a remainder of 0.
Use 5 as the next digit of our solution. 
Result so far: 19759.5
Deduct 200 from 200 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.

Let's proceed to step 8:
If we divide 0 by 40, we get 0 and a remainder of 0.
Put 0 as the next digit of the answer. 
Result so far: 19759.5
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.

Moving on to step 9:
The number 40 fits into 0 0 times, leaving a remainder of 0.
Write down 0 as next digit of the result. 
Result so far: 19759.5
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 result is 19759.5 with a remainder of 0.0.