Water Mixing
Chef is setting up a perfect bath for himself. He has $X$ litres of hot water and $Y$ litres of cold water. The initial temperature of water in his bathtub is $A$ degrees. On mixing water, the temperature of the bathtub changes as following: - The temperature rises by $1$ degree on mixing $1$ litre of hot water. - The temperature drops by $1$ degree on mixing $1$ litre of cold water. Determine
HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17
CodeSearch Tutor
Hints, not spoilers — it won’t hand over the full solution unless you insist.
Sign in to chat with the tutor and save your progress.
Sign in to start