How do I test for user input for equations?
<p>I have an equation with 4 variables, I am prompting the user to enter each one of these variables, and then the program decides based on what variables are entered, which variables it needs to solve for. For instance, given variable a and b, I need to solve for b and c. I am trying to come up with a way for the program to decide which variables have been entered, and which ones have not been. This is what I have been thinking so far:</p>

<pre><code>int a,b,c,d;
char unknown;
cout&lt;&lt;"****This program decides which variables to solve for****\n;
cout&lt;&lt;"Please enter the known variables below, if a variable is unknown, 
please enter a'?'\n"
cout&lt;&lt; "please enter variable a\n";
cin&gt;&gt;a;
cout&lt;&lt; "please enter variable b\n";
cin&gt;&gt;b;
etc....
if (a =='?'){
 check b,c,d}
if (b =='?'){
 check c,d}
</code></pre>

<p>And then running those variables through if statements to determine which variables are present and which aren't. There has to be an easier way though, these if else if statements have the potential to be ridiculous. If any of you have any advice its much appreciated. Thanks!</p>
