title: C++ Program clear screen
body: <pre><code>#include &lt;iostream&gt;
  #include &lt;iomanip&gt;
  
  using namespace std;
  
  void far_cels();
  void cels_far();
  void quit();
  void answerF(double);
  void answerC(double);
  double getTemp();
  
  
  
  int main()
  {
  cout &lt;&lt; "--MENU--\n" &lt;&lt; "PLease make a selection\n"
       &lt;&lt; "1: Farenheit to Celsius conversion\n"
       &lt;&lt; "2: Celsius to Farenheit conversion\n"
       &lt;&lt; "3: Quit Program\n"
       &lt;&lt; "MAKE SELECTION : ";
  
  int num = 0;
  cin &gt;&gt; num;
  switch (num) {
      case 1:far_cels();
      case 2:cels_far();
      case 3: quit(); 
      default: return main();
  }
  
  }
  
  
  
  double getTemp()
  {
      double temp;
      cout &lt;&lt; "Enter the tempature you want to convert\n";
      cin &gt;&gt; temp;
      return temp;
  }
  
  
  void far_cels()
  {
  double farenheit;
  double celsius;
  farenheit = getTemp();
  celsius = farenheit - 32 / 1.8;
  answerC(celsius);
  
  }
  void cels_far()
  {
  double farenheit;
  double celsius;
  celsius = getTemp();
  farenheit = celsius * 1.8 + 32;
  answerF(farenheit);
  
  }
  void answerF(double farenheit)
  {
  cout &lt;&lt; "The Tempature is: " &lt;&lt; endl;
  cout &lt;&lt; setprecision (4);
  cout &lt;&lt; farenheit &lt;&lt;" degrees farenheit " &lt;&lt; endl;
  
  }
  void answerC(double celsius)
  {
  cout &lt;&lt; "Your temperature is: " &lt;&lt; endl;
  cout &lt;&lt; setprecision (4);
  cout &lt;&lt; celsius &lt;&lt;" degrees celsius " &lt;&lt; endl;
  
  }
  void quit(){
  
  }
  </code></pre>
  
  <p>I can not seem to figure out how to clear the screen and return main() if the switch statement is not activated. I have figured out how to return to main but the menu is still there.  Any help would be greatly appreciated I am just starting out and need all the advice I can get. The other parts of the code seem to work well but if I anyone can see problems in what I am doing that would also be greatly appreciated. I am also using Xcode on a mac.</p>