To solve the problem, we need to determine how many days C worked when A, B, and C worked together on a piece of work, with A leaving after 9 days and B leaving 3 days before the work was completed.
### Step-by-Step Solution:
1. **Determine the Work Rates of A, B, and C:**
- A can complete the work in 24 days, so A's work rate is \( \frac{1}{24} \) of the work per day.
- B can complete the work in 36 days, so B's work rate is \( \frac{1}{36} \) of the work per day.
- C can complete the work in 108 days, so C's work rate is \( \frac{1}{108} \) of the work per day.
2. **Calculate the Total Work:**
- The least common multiple (LCM) of 24, 36, and 108 is 216. Therefore, the total work can be considered as 216 units.
3. **Calculate the Individual Work Rates in Units:**
- A's work rate: \( \frac{216}{24} = 9 \) units per day.
- B's work rate: \( \frac{216}{36} = 6 \) units per day.
- C's work rate: \( \frac{216}{108} = 2 \) units per day.
4. **Calculate Work Done in the First 9 Days:**
- In the first 9 days, A, B, and C work together:
- Total work done in 9 days = \( (9 + 6 + 2) \times 9 = 17 \times 9 = 153 \) units.
5. **Determine Remaining Work:**
- Remaining work after 9 days = Total work - Work done in 9 days
- Remaining work = \( 216 - 153 = 63 \) units.
6. **Calculate the Work Done by B and C:**
- B leaves 3 days before the work is completed, meaning B works for \( T - 3 \) days, where \( T \) is the total time taken to complete the work.
- Let \( x \) be the number of days B worked after A left. Hence, C worked for \( x + 3 \) days.
7. **Work Done by B and C Together:**
- Work done by B and C in the remaining days = \( (6 + 2) \times x = 8x \).
- Since they need to complete the remaining 63 units, we have:
- \( 8x = 63 \)
- \( x = \frac{63}{8} = 7.875 \) days.
8. **Total Days Worked:**
- Total days worked by C = Days worked together + Days worked after A left
- C worked for 9 days (with A and B) + 7.875 days (with B) = \( 9 + 7.875 = 16.875 \) days.
9. **Final Calculation:**
- Since B left 3 days before the work was completed, C worked for an additional 3 days alone to finish the work.
- Therefore, total days C worked = \( 16.875 + 3 = 19.875 \) days.
### Conclusion:
C worked for approximately 20 days.