A dark mage casted a black spell On the fountain of life.So,instead of producing the elixir of life,the fountain now produces the elixir of life and the dark poison at rate r (litet/sec). the fountain will become deadly when the amount of poison is the as that of elixir in the fountain.

Write a C++ program that input the initial volume of elixir in the fountian before the spell was costed ,the rate of elixir production (e liters/sec),and the rate of poison production (r),It should output the time,t in second when the mixture becomes deadly.
Note (cannot use while loop)

please help me

4 Years
Discussion Span
Last Post by rubberman

This seems more like an algebra problem than a programming problem. You really don't need much more than a subtraction and a division; the only trick is figuring out exactly what to subtract and divide to find the result you want. You can work that out with a pencil, paper, and tiny amount of algebra.


What bguild said. Also, we don't do your homework for you! Consider that to be cheating, and I'm SURE you don't want to do that, do you? :-)

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.