title: Switch statements with while loops
body: <pre><code>do{ 
          cout &lt;&lt; "Select an option from the Menu:  ";
          cin &gt;&gt; choice;
           // Validate the menu selection
              while ((choice &lt; 1) || (choice &gt; 3)){
                  cout &lt;&lt; "Incorrect input!, please enter an option from 1 to 3."&lt;&lt;endl;
                  cout&lt;&lt;"Enter your choice: ";
                  cin &gt;&gt; choice;
              }
          // Processing the users choice
              if (choice != 3){ 
          // Compute conversions
                  switch (choice){
                          case 1:
                              cout&lt;&lt;""&lt;&lt;endl; 
                              cout&lt;&lt;"You have selected to convert Fijian Dollars to Vanuatuan Vatu."&lt;&lt;endl;
                              cout&lt;&lt;"Enter the amount you wish to convert: ";
                              cin &gt;&gt; amount;
                              conversion = amount * FJD_to_Vatu_Rate;
                          break;
  
                          case 2: 
                              cout&lt;&lt;""&lt;&lt;endl;
                              cout&lt;&lt;"You have selected to convert Fijian Dollars to Samoan Tala."&lt;&lt;endl;
                              cout&lt;&lt;"Enter the amount you wish to convert: ";
                              cin &gt;&gt; amount;
                              conversion = amount * FJD_to_Tala_Rate;
                          break;
  
                          case 3:
                              cout&lt;&lt;"Here the history will be shown"&lt;&lt;endl;
                              cout&lt;&lt;""&lt;&lt;endl;
                              cout&lt;&lt;"Do You want to perform another conversion? (Y/N) ";
                              cin &gt;&gt; repeat;
                                  if (repeat == 'Y'){
                                      (This is what i want to know)
                                   }
                              cout&lt;&lt;"Thank you for using this program, goodbye!"&lt;&lt;endl;
                              return 0;
  
              }
          // Display the monthly charges
              cout &lt;&lt; fixed &lt;&lt; showpoint &lt;&lt; setprecision(2);
              cout &lt;&lt; "The converted amount is: " &lt;&lt; conversion &lt;&lt; endl;
              cout &lt;&lt;""&lt;&lt;endl;
          }
      } while (choice != 3);
      cout&lt;&lt;"Thank you for using this program, goodbye!"&lt;&lt;endl;
  return 0;
  }
  </code></pre>
  
  <p>The above is my part of my code for a currency converter, can anyone tell me if what to do in the section where it says "this is what i want to know" so that the program asks user to enter a choice so it can process it and use the choice to compute using one of the other cases.</p>
  
  <p>Thanks</p>