31078 divided by 40 
We're looking to find how many times 40 goes into 31078.

Moving on to step 1:
The number 40 fits into 3 0 times, leaving a remainder of 3.
The number 0 becomes the next digit in our result. 
Result so far: 0.0
Subtract 0 from 3 to get 3.
Take the next digit (1) from the dividend and append it to 3, then repeat: 31 / 40

Let's proceed to step 2:
If we divide 31 by 40, we get 0 and a remainder of 31.
Write down 0 as next digit of the result. 
Result so far: 0.0
The remainder is 31 after subtracting 0 from 31.
Fetch the next digit (0) from the dividend, attach it to 31 and continue: 310 / 40

Let's proceed to step 3:
40 can be fit into 310 7 times, resulting in a remainder of 30.
The number 7 becomes the next digit in our result. 
Result so far: 7.0
If we take 280 away from 310, we end up with 30.
Append the next digit (7) from the dividend to 30 and continue with: 307 / 40

Advancing to step 4:
When dividing 307 by 40, we get 7 with a remainder of 27.
Record the quotient 7 as the next digit in the result. 
Result so far: 77.0
Subtracting 280 from 307 leaves us with 27.
Bring next digit (8) of the dividend behind the 27 and repeat the process: 278 / 40

Moving on to step 5:
40 goes into 278 6 times with a remainder of 38.
The next digit of our result is 6. 
Result so far: 776.0
Subtracting 240 from 278 leaves us with 38.
Since there are no more digits in the dividend, we add a zero to the remainder making it 380, and continue the process.

Moving on to step 6:
The number 40 fits into 380 9 times, leaving a remainder of 20.
Put 9 as the next digit of the answer. 
Result so far: 776.9
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:
When dividing 200 by 40, we get 5 with a remainder of 0.
The number 5 becomes the next digit in our result. 
Result so far: 776.95
If we subtract 200 from 200, we 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 8:
When dividing 0 by 40, we get 0 with a remainder of 0.
Put 0 as the next digit of the answer. 
Result so far: 776.95
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.

Step 9:
When dividing 0 by 40, we get 0 with a remainder of 0.
The next digit of our result is 0. 
Result so far: 776.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.

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