We look at the division of 797598 by 40 
We want to divide 797598 by 40.

Advancing to step 1:
When dividing 7 by 40, we get 0 with a remainder of 7.
The next digit of our result is 0. 
Result so far: 0.0
If we take 0 away from 7, we end up with 7.
Include the next digit (9) from the dividend after 7, then repeat: 79 / 40

Moving on to step 2:
If we divide 79 by 40, we get 1 and a remainder of 39.
Record the quotient 1 as the next digit in the result. 
Result so far: 1.0
The remainder is 39 after subtracting 40 from 79.
Fetch the next digit (7) from the dividend, attach it to 39 and continue: 397 / 40

Step 3:
397 divided by 40 is 9 with a remainder of 37.
Record the quotient 9 as the next digit in the result. 
Result so far: 19.0
Subtracting 360 from 397 leaves us with 37.
Grab the next digit (5) from the dividend, add it to 37, then carry on: 375 / 40

On to step 4:
The number 40 fits into 375 9 times, leaving a remainder of 15.
Record the quotient 9 as the next digit in the result. 
Result so far: 199.0
Subtract 360 from 375 to get 15.
Bring next digit (9) of the dividend behind the 15 and repeat the process: 159 / 40

Let's proceed to step 5:
If we divide 159 by 40, we get 3 and a remainder of 39.
Write down 3 as next digit of the result. 
Result so far: 1993.0
Subtract 120 from 159 to get 39.
Append the next digit (8) from the dividend to 39 and continue with: 398 / 40

On to step 6:
40 can be fit into 398 9 times, resulting in a remainder of 38.
Write down 9 as next digit of the result. 
Result so far: 19939.0
The remainder is 38 after subtracting 360 from 398.
Since there are no more digits in the dividend, we add a zero to the remainder making it 380, and continue the process.

On to step 7:
The number 40 fits into 380 9 times, leaving a remainder of 20.
Use 9 as the next digit of our solution. 
Result so far: 19939.9
Subtracting 360 from 380 leaves us 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 8:
When dividing 200 by 40, we get 5 with a remainder of 0.
Use 5 as the next digit of our solution. 
Result so far: 19939.95
The remainder is 0 after subtracting 200 from 200.
Since there are no more digits in the dividend, we add a zero to the remainder making it 0, and continue the process.

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: 19939.95
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.

Moving on to 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: 19939.95
The remainder is 0 after subtracting 0 from 0.
Since there are no more digits in the dividend, we add a zero to the remainder making it 0, and continue the process.

In conclusion, the division gives 19939.95 with a balance of 0.0.