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

Recommended Answers

What do you have so far?

Jump to Post

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, …

Jump to Post

All 5 Replies

What do you have so far?

I need a c++ for this can you help me ?

No. We will help you if you have issues, but we do not provide fully functional code.

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? :-)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.21 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.