title: How would I prompt the user to give them the option to rerun program in C++
body: <p>The option could look like: "To run the program again enter 'y', to exit enter 'n'. In my program I ask the user to enter a package A,B, or C. Then I calculate the price based on different factors. But I have to give the user the option to select another package an rerun the entire program?</p>
  
  <pre><code>#include &lt;iostream&gt;
  
  using namespace std;
  
  int main() {
  bool finished = false;
  char choice;
  int choice_a = 995;
  int choice_b = 1995;
  int choice_c = 3995;
  int message_units;
  int price;
  bool selected = false;
  
  do {
  
      do {          //Prompt user to enter package
          cout &lt;&lt; "Which package do you choose (enter A, B or C)" &lt;&lt; endl;
  
          cin &gt;&gt; choice;
  
          if (choice == 'A') { price = choice_a; selected = true; }
          else if (choice == 'B') { price = choice_b; selected = true; }
          else if (choice == 'C') { price = choice_c; selected = true; }
          cout &lt;&lt; endl;
      }
  
      while (selected == false);
              //Prompt user to enter message units
      cout &lt;&lt; "How many message units (enter 1 - 672)" &lt;&lt; endl;
  
      cin &gt;&gt; message_units;
  
             //calculate message units
      if((message_units &gt; 5) &amp;&amp; (choice == 'A')){
          price += 100 * (message_units - 5);
      }
        if((message_units &gt; 15) &amp;&amp; (choice == 'B')){
          price += 50 * (message_units - 15);
      }
  
  
  
                      //Total Cost
      cout &lt;&lt; "Your total cost is " &lt;&lt; price/100 &lt;&lt; "." &lt;&lt; price%100 &lt;&lt; 
  </code></pre>