You have to measure exactly 4 liters of water, but you only have a 3-liter bottle and a 5-liter bottle.
How do you do it?
Answer:
Fill the 3-liter bottle and pour it into the empty 5-liter bottle.
Fill the 3-liter bottle again, and pour enough to fill 5-liter bottle.
This leaves exactly 1 liter in the 3-liter bottle.
Empty the 5-liter bottle; pour the remaining 1 liter from the 3-liter
bottle into the 5-liter bottle.
Fill the 3-liter bottle and pour it into the 5-liter bottle.
The 5-liter bottle now has exactly 4 liters.
Here is another way to do it*
Fill the 5-liter bottle and pour water from it into the
3-liter bottle until it is full.
This leaves 2 liters in the 5-liter bottle.
Empty the 3-liter bottle and pour the
2 liters of water from the 5-liter bottle into the 3-liter bottle.
Fill the 5-liter bottle again.
Fill the 3-liter bottle from the 5-liter bottle.
Since the 3-liter bottle had 2 liters of water, only one liter is transferred
leaving exactly 4 liters of water in the 5-liter jug.