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

Advancing to step 1:
If we divide 6 by 7, we get 0 and a remainder of 6.
The next digit of our result is 0. 
Result so far: 0.0
Deduct 0 from 6 and we're left with 6.
Fetch the next digit (0) from the dividend, attach it to 6 and continue: 60 / 7

Step 2:
60 divided by 7 is 8 with a remainder of 4.
Put 8 as the next digit of the answer. 
Result so far: 8.0
If we take 56 away from 60, we end up with 4.
Bring next digit (4) of the dividend behind the 4 and repeat the process: 44 / 7

Moving on to step 3:
If we divide 44 by 7, we get 6 and a remainder of 2.
The number 6 becomes the next digit in our result. 
Result so far: 86.0
If we take 42 away from 44, we end up with 2.
Bring next digit (0) of the dividend behind the 2 and repeat the process: 20 / 7

Step 4:
20 divided by 7 is 2 with a remainder of 6.
Write down 2 as next digit of the result. 
Result so far: 862.0
Subtract 14 from 20 to get 6.
Since there are no more digits in the dividend, we add a zero to the remainder making it 60, and continue the process.

Step 5:
7 can be fit into 60 8 times, resulting in a remainder of 4.
Use 8 as the next digit of our solution. 
Result so far: 862.8
If we take 56 away from 60, we end up with 4.
Since there are no more digits in the dividend, we add a zero to the remainder making it 40, and continue the process.

Moving on to step 6:
If we divide 40 by 7, we get 5 and a remainder of 5.
Use 5 as the next digit of our solution. 
Result so far: 862.85
If we subtract 35 from 40, we get 5.
Since there are no more digits in the dividend, we add a zero to the remainder making it 50, and continue the process.

Advancing to step 7:
The number 7 fits into 50 7 times, leaving a remainder of 1.
Put 7 as the next digit of the answer. 
Result so far: 862.857
Deduct 49 from 50 and we're left with 1.
Since there are no more digits in the dividend, we add a zero to the remainder making it 10, and continue the process.

Step 8:
10 divided by 7 is 1 with a remainder of 3.
The next digit of our result is 1. 
Result so far: 862.8571
Subtracting 7 from 10 leaves us with 3.
Since there are no more digits in the dividend, we add a zero to the remainder making it 30, and continue the process.

Let's proceed to step 9:
When dividing 30 by 7, we get 4 with a remainder of 2.
Put 4 as the next digit of the answer. 
Result so far: 862.85714
If we take 28 away from 30, we end up with 2.
Since there are no more digits in the dividend, we add a zero to the remainder making it 20, and continue the process.

On to step 10:
If we divide 20 by 7, we get 2 and a remainder of 6.
The next digit of our result is 2. 
Result so far: 862.857142
If we subtract 14 from 20, we get 6.
Since there are no more digits in the dividend, we add a zero to the remainder making it 60, and continue the process.

Advancing to step 11:
7 can be fit into 60 8 times, resulting in a remainder of 4.
Write down 8 as next digit of the result. 
Result so far: 862.8571428
If we subtract 56 from 60, we get 4.
Since there are no more digits in the dividend, we add a zero to the remainder making it 40, and continue the process.

Advancing to step 12:
If we divide 40 by 7, we get 5 and a remainder of 5.
Write down 5 as next digit of the result. 
Result so far: 862.85714285
Subtract 35 from 40 to get 5.
Since there are no more digits in the dividend, we add a zero to the remainder making it 50, and continue the process.

After the division, we end up with 862.85714285 and a remainder of 5e-09.