987298 divided by 40 
Let's see how many times 40 fits into 987298.

Step 1:
40 goes into 9 0 times with a remainder of 9.
Write down 0 as next digit of the result. 
Result so far: 0.0
The remainder is 9 after subtracting 0 from 9.
Bring next digit (8) of the dividend behind the 9 and repeat the process: 98 / 40

Moving on to step 2:
40 can be fit into 98 2 times, resulting in a remainder of 18.
The number 2 becomes the next digit in our result. 
Result so far: 2.0
If we take 80 away from 98, we end up with 18.
Take the next digit (7) from the dividend and append it to 18, then repeat: 187 / 40

Going ahead to step 3:
The number 40 fits into 187 4 times, leaving a remainder of 27.
The number 4 becomes the next digit in our result. 
Result so far: 24.0
If we take 160 away from 187, we end up with 27.
Take the next digit (2) from the dividend and append it to 27, then repeat: 272 / 40

Let's proceed to step 4:
When dividing 272 by 40, we get 6 with a remainder of 32.
Write down 6 as next digit of the result. 
Result so far: 246.0
The remainder is 32 after subtracting 240 from 272.
Take the next digit (9) from the dividend and append it to 32, then repeat: 329 / 40

Step 5:
40 goes into 329 8 times with a remainder of 9.
The next digit of our result is 8. 
Result so far: 2468.0
If we subtract 320 from 329, we get 9.
Include the next digit (8) from the dividend after 9, then repeat: 98 / 40

Moving on to step 6:
40 goes into 98 2 times with a remainder of 18.
Put 2 as the next digit of the answer. 
Result so far: 24682.0
If we subtract 80 from 98, we get 18.
Since there are no more digits in the dividend, we add a zero to the remainder making it 180, and continue the process.

Step 7:
40 goes into 180 4 times with a remainder of 20.
The number 4 becomes the next digit in our result. 
Result so far: 24682.4
The remainder is 20 after subtracting 160 from 180.
Since there are no more digits in the dividend, we add a zero to the remainder making it 200, and continue the process.

On to step 8:
The number 40 fits into 200 5 times, leaving a remainder of 0.
The next digit of our result is 5. 
Result so far: 24682.45
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.

Going ahead to step 9:
0 divided by 40 is 0 with a remainder of 0.
Put 0 as the next digit of the answer. 
Result so far: 24682.45
Subtracting 0 from 0 leaves us 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:
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: 24682.45
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.

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