We're dividing 1291 by 45 
Let's see how many times 45 fits into 1291.

Advancing to step 1:
If we divide 1 by 45, we get 0 and a remainder of 1.
Write down 0 as next digit of the result. 
Result so far: 0.0
The remainder is 1 after subtracting 0 from 1.
Fetch the next digit (2) from the dividend, attach it to 1 and continue: 12 / 45

Let's proceed to step 2:
When dividing 12 by 45, we get 0 with a remainder of 12.
Write down 0 as next digit of the result. 
Result so far: 0.0
Subtracting 0 from 12 leaves us with 12.
Fetch the next digit (9) from the dividend, attach it to 12 and continue: 129 / 45

Step 3:
The number 45 fits into 129 2 times, leaving a remainder of 39.
Record the quotient 2 as the next digit in the result. 
Result so far: 2.0
If we take 90 away from 129, we end up with 39.
Bring next digit (1) of the dividend behind the 39 and repeat the process: 391 / 45

Going ahead to step 4:
When dividing 391 by 45, we get 8 with a remainder of 31.
Write down 8 as next digit of the result. 
Result so far: 28.0
If we subtract 360 from 391, we get 31.
Since there are no more digits in the dividend, we add a zero to the remainder making it 310, and continue the process.

Advancing to step 5:
When dividing 310 by 45, we get 6 with a remainder of 40.
The next digit of our result is 6. 
Result so far: 28.6
If we take 270 away from 310, we end up with 40.
Since there are no more digits in the dividend, we add a zero to the remainder making it 400, and continue the process.

Step 6:
When dividing 400 by 45, we get 8 with a remainder of 40.
The next digit of our result is 8. 
Result so far: 28.68
Deduct 360 from 400 and we're left with 40.
Since there are no more digits in the dividend, we add a zero to the remainder making it 400, and continue the process.

Moving on to step 7:
The number 45 fits into 400 8 times, leaving a remainder of 40.
Use 8 as the next digit of our solution. 
Result so far: 28.688
Subtract 360 from 400 to get 40.
Since there are no more digits in the dividend, we add a zero to the remainder making it 400, and continue the process.

The final outcome is 28.688, with a leftover of 0.004.