console program exits
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/2529617/how-to-stop-c-console-application-from-exiting-immediately">How to stop C++ console application from exiting immediately?</a>  </p>
</blockquote>



<p>I have the following console program:</p>

<pre><code>#include &lt;iostream&gt;
using namespace std;

int main()
{
    int a;
    int b;


cout&lt;&lt;"Enter a";
cin&gt;&gt;a;

cout&lt;&lt;"Enter b";
cin&gt;&gt;b;

int result = a*b;

cout&lt;&lt;"You entered"&lt;&lt;a&lt;&lt;"and you entered"&lt;&lt;b&lt;&lt;"Their product is"&lt;&lt;result&lt;&lt;endl;
    return 0;
}
</code></pre>

<p>Once i run the program,it accepts the input but exits before i can have a look at the results.What do i need to do for the program not to exit before i can take a look at the results?.</p>
