How to solve in Ruby an equation with (any) one variable missing ?

Next Topic
 
classic Classic list List threaded Threaded
1 message Options
tjg
Reply | Threaded
Open this post in threaded view
|

How to solve in Ruby an equation with (any) one variable missing ?

tjg
This post has NOT been accepted by the mailing list yet.
This post was updated on .
I am a beginner in Ruby. Please dismiss this question if you find it too… ground level…

I have this simple equation :

TotaRevenue – FixedCosts — VariableCosts - Profit = 0

where

VariableCosts = FixedCosts * Coeff  

And, I would like to "solve" it by entering only 4 of the 5 variables.

How am I supposed to "call" 4 values out of 5, leaving 1 out of 5 to be calculated ?

Thanks in advance