title: Process still running C++
body: <p>I've looked around on how to solve this problem but I must be looking for the wrong thing because I can't find anything.</p>
  
  <p>I've just started learning C++ and I've come across a problem where once it has been compiled and is running, It'll finish or i'll close the window, yet the process is still running. When I then use task manager to end the process it does absolutely noting.</p>
  
  <p>Here is something I wrote up, what is it that I need to add in or take out to make sure that the process is terminated once it has finished or is manually closed?</p>
  
  <pre><code>#include &lt;iostream&gt;
  using namespace std;
  
  int main()
  {
  
      int grade;
  
      cout &lt;&lt; "Please enter your grade (0-100) ";
      cin &gt;&gt; grade;
  
      if (grade == 100)
          cout &lt;&lt; "You got a perfect score" &lt;&lt; endl;
      else if (grade &gt;= 90 &amp;&amp; grade &lt;= 99)
          cout &lt;&lt; "You scored an A" &lt;&lt; endl;
      else if (grade &gt;= 80 &amp;&amp; grade &lt; 90)
          cout &lt;&lt; "You scored a B" &lt;&lt; endl;
      else if (grade &gt;= 70 &amp;&amp; grade &lt; 80)
          cout &lt;&lt; "You scored a C" &lt;&lt; endl;
      else if (grade &gt;= 60 &amp;&amp; grade &lt; 70)
          cout &lt;&lt; "You scored a D" &lt;&lt; endl;
      else if (grade &gt;= 0 &amp;&amp; grade &lt; 60)
          cout &lt;&lt; "You scored an F" &lt;&lt; endl;
  
      system("pause");
  }
  </code></pre>