C++ - accepting command line arguments?
<p>So this was my original code:</p>

<pre><code>#include &lt;iostream&gt;

using namespace std;

int main ()
{
    float x;  
    cout &lt;&lt; "Please enter an integer value: ";
    cin &gt;&gt; x;

    if ((x &gt;= 100) &amp;&amp; (x &lt; 200)) {
        cout &lt;&lt; "split";
    } else if (x == 0 ||x == 1 ) {
        cout &lt;&lt; "steal";
    } else {
        cout &lt;&lt; "split";
    } 

    system("pause");
}
</code></pre>

<hr>

<p>It works perfectly, but I need it to run this way:</p>

<pre><code>C:\&gt; program.exe 109
</code></pre>

<p>it will read <code>109</code> and give the output - <code>"steal"</code>. </p>

<pre><code>C:\&gt; program.exe 0.5
</code></pre>

<p>it will read <code>0.5</code> and give me the output <code>"split"</code>. </p>

<p>What do I have to add to my original code to do this? </p>
