Let's divide 40022 by 77
Our goal is to divide 40022 by 77.

Step 1:
If we divide 4 by 77, we get 0 and a remainder of 4.
Use 0 as the next digit of our solution. 
Result so far: 0.0
If we take 0 away from 4, we end up with 4.
Fetch the next digit (0) from the dividend, attach it to 4 and continue: 40 / 77

Let's proceed to step 2:
If we divide 40 by 77, we get 0 and a remainder of 40.
Record the quotient 0 as the next digit in the result. 
Result so far: 0.0
Subtract 0 from 40 to get 40.
Bring next digit (0) of the dividend behind the 40 and repeat the process: 400 / 77

Advancing to step 3:
When dividing 400 by 77, we get 5 with a remainder of 15.
Record the quotient 5 as the next digit in the result. 
Result so far: 5.0
Deduct 385 from 400 and we're left with 15.
Bring next digit (2) of the dividend behind the 15 and repeat the process: 152 / 77

Advancing to step 4:
77 can be fit into 152 1 times, resulting in a remainder of 75.
Use 1 as the next digit of our solution. 
Result so far: 51.0
If we subtract 77 from 152, we get 75.
Fetch the next digit (2) from the dividend, attach it to 75 and continue: 752 / 77

On to step 5:
If we divide 752 by 77, we get 9 and a remainder of 59.
Write down 9 as next digit of the result. 
Result so far: 519.0
If we take 693 away from 752, we end up with 59.
Since there are no more digits in the dividend, we add a zero to the remainder making it 590, and continue the process.

Going ahead to step 6:
The number 77 fits into 590 7 times, leaving a remainder of 51.
Put 7 as the next digit of the answer. 
Result so far: 519.7
Subtract 539 from 590 to get 51.
Since there are no more digits in the dividend, we add a zero to the remainder making it 510, and continue the process.

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

On to step 8:
77 goes into 480 6 times with a remainder of 18.
Record the quotient 6 as the next digit in the result. 
Result so far: 519.766
Subtracting 462 from 480 leaves us with 18.
Since there are no more digits in the dividend, we add a zero to the remainder making it 180, and continue the process.

The quotient of the division is 519.766, and the remainder is 0.0018.