Let's divide 158779 by 40
We want to figure out the number of times 158779 can be divided by 40.

Step 1:
The number 40 fits into 1 0 times, leaving a remainder of 1.
The number 0 becomes the next digit in our result. 
Result so far: 0.0
If we subtract 0 from 1, we get 1.
Take the next digit (5) from the dividend and append it to 1, then repeat: 15 / 40

Let's proceed to step 2:
15 divided by 40 is 0 with a remainder of 15.
Write down 0 as next digit of the result. 
Result so far: 0.0
The remainder is 15 after subtracting 0 from 15.
Include the next digit (8) from the dividend after 15, then repeat: 158 / 40

Going ahead to step 3:
40 goes into 158 3 times with a remainder of 38.
The number 3 becomes the next digit in our result. 
Result so far: 3.0
Subtract 120 from 158 to get 38.
Include the next digit (7) from the dividend after 38, then repeat: 387 / 40

Moving on to step 4:
The number 40 fits into 387 9 times, leaving a remainder of 27.
The number 9 becomes the next digit in our result. 
Result so far: 39.0
Subtract 360 from 387 to get 27.
Include the next digit (7) from the dividend after 27, then repeat: 277 / 40

Going ahead to step 5:
40 goes into 277 6 times with a remainder of 37.
Use 6 as the next digit of our solution. 
Result so far: 396.0
If we subtract 240 from 277, we get 37.
Fetch the next digit (9) from the dividend, attach it to 37 and continue: 379 / 40

On to step 6:
40 goes into 379 9 times with a remainder of 19.
Write down 9 as next digit of the result. 
Result so far: 3969.0
Subtract 360 from 379 to get 19.
Since there are no more digits in the dividend, we add a zero to the remainder making it 190, and continue the process.

Moving on to step 7:
40 goes into 190 4 times with a remainder of 30.
Write down 4 as next digit of the result. 
Result so far: 3969.4
Deduct 160 from 190 and we're left with 30.
Since there are no more digits in the dividend, we add a zero to the remainder making it 300, and continue the process.

Let's proceed to step 8:
300 divided by 40 is 7 with a remainder of 20.
The next digit of our result is 7. 
Result so far: 3969.47
Deduct 280 from 300 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.

Step 9:
The number 40 fits into 200 5 times, leaving a remainder of 0.
The number 5 becomes the next digit in our result. 
Result so far: 3969.475
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.

Going ahead to step 10:
40 goes into 0 0 times with a remainder of 0.
Put 0 as the next digit of the answer. 
Result so far: 3969.475
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 11:
0 divided by 40 is 0 with a remainder of 0.
Put 0 as the next digit of the answer. 
Result so far: 3969.475
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.

After the division, we end up with 3969.475 and a remainder of 0.0.