title: Whenever I try to get the result for my program the debug lab exits before I can see my result
body: <pre><code>#include &lt;iostream&gt;
  #include &lt;string&gt;
  #include &lt;fstream&gt;
  using namespace std;
  
  int main()
  {
  //Declares a variable named name that holds text.
  string name;
  //Declares variables named height and radius that hold whole numbers.
  int height, radius;
  //Declares a variable named volume that holds double precision real numbers.
  double volume;
  //Declare a constant variable for PI
  const double PI = 3.1415;
  //Declare input file
  ifstream inFile;
  //open file
  inFile.open("input4.txt"); 
  //Prompts the user "May I get your full name please?: ".
  cout &lt;&lt; "May I get your full name please?: " &lt;&lt; endl;
  //Reads the value from the keyboard and stores it in name.
  getline( cin, name);
  //Prompts the user "Thanks ", name, " , now enter height and radius of the cone please: ".
  cout &lt;&lt; "Thanks " &lt;&lt; name &lt;&lt; ", now enter height and radius of the cone please: " &lt;&lt; endl;
  //Reads the values from the keyboard and stores them in height and radius respectively.
  cin &gt;&gt; height;
  cin &gt;&gt; radius;
  //Calculates the volume using the formula volume = 1.0/3 x 3.1415 x radius x radius x height 
  volume = 1.0/3 * PI * radius * radius * height;
  //Rounds the volume to the nearest tenths (one decimal digit) and reassigns it to volume.
  volume = static_cast&lt;double&gt;(static_cast&lt;int&gt;((volume * 10.0) + 0.5))/10.0;
  //Print final message
  cout &lt;&lt; "Ok " &lt;&lt; name &lt;&lt; " the cone's volume is " &lt;&lt; volume &lt;&lt; endl;
  inFile.close();
  return 0;
  }
  </code></pre>
  
  <p>Once I press enter to get my volume the debug lab exits before I can get the answer. I have only been able to see my answer by recording the screen and playing it back. Any help is welcome. Thank you.</p>