How to setup Math program
<p>I'm needing to write a program (C#) that will allow the user to create generic formulas with variables and numbers. For example:</p>

<pre><code>D = A + (A - C / X)(7.8 - 6.6)
F = E + (E - C / X)(7.8 - 6.6)
FinalResult = (A + D)(0.9) + (E + F)(0.32) + B(0.1) + .023
</code></pre>

<p>where all variables would mean for me to go to a database and look something up based on values and return a number in its place. So A would be 2.12 for example (and the same for C and E)</p>

<p>Whats the best way to structure this program? How would I make my program read these formulas?</p>

<p>I've seen a little bit of the MathML but not sure how to get that started (or an example of it)</p>

<p>--Update--</p>

<p>I mentioned MathML just seeing some other questions involving it on SO. Y'all are correct, I'm not needing to display it, I'm just needing to identify what someone wants and use that to calculate something.</p>

<p>My variables will map to something in a database. For example, A would tell me to use the following:</p>

<pre><code>Vend_Key = 3
Trmnl_Key = 5
Prod_Key = 7
</code></pre>

<p>which would then be used to return a number from a database.</p>

<p>I'm going to need a database to save the formula's that people create. I'll have to have a scheduled task that can run and execute these functions and save the information somewhere else.</p>
