title: Implementing do while and exit
body: <p>Being fairly new to Java, I have written this program to calculate various currencies. I would like to ask the user if they wish to repeat the process until the user wishes to exit. Please assist me in this matter. My code so far:</p>
  
  <pre><code>public static void main(String[] args) {
  
  
      Scanner input = new Scanner(System.in); 
      DecimalFormat formatter = new DecimalFormat("#0.00");
  
      String CType, c1 = "US", c2 = "EUR", c3 = "RM", c4 = "SAR"; 
      double CValue , US, EUR, RM, SGD, SAR;
  
  
      System.out.println("Welcome to Bonus Calculator");
  
      System.out.println("Enter any of the following Currencies:"); 
      System.out.print("US\n" +
                       "EUR\n" +
                       "RM\n" +
                       "SGD\n" +
                       "SAR: ");
      CType = input.next();
  
  
  
     if(CType.equalsIgnoreCase("US")){
       System.out.print("Enter Value: ");
       CValue = input.nextInt();
  
         EUR = CValue * .88;
         RM = CValue * 3.92;
         SGD = CValue * 1.35;
         SAR = CValue * 3.75;
  
     System.out.print("US = " + formatter.format(CValue) + "EUR =" + formatter.format(EUR) + "RM =" + formatter.format(RM) + "SGD =" + formatter.format(SGD) + "SAR =" + formatter.format(SAR));
  
     }
  
     else if(CType.equalsIgnoreCase("EU")){ 
         System.out.print("Enter Value: ");
         CValue = input.nextInt();
         US = CValue * 1.14;
         RM = US * 3.92;
         SGD = US * 1.35;
         SAR = US * 3.75;
  
     System.out.print("EUR = " + formatter.format(CValue) + " US = " + formatter.format(US) + " RM = " + formatter.format(RM) +" SGD = " + formatter.format(SGD) +" SAR = " + formatter.format(SAR));
  
     }
  
     else if (CType.equalsIgnoreCase("RM")){
         System.out.print("Enter Value: ");
         CValue = input.nextInt();
         US = CValue * .26;
         EUR = US * .88;
         SGD = US * 1.35;
         SAR = US * 3.75;
  
     System.out.print("RM = " + formatter.format(CValue) + " US = " + formatter.format(US) + " EUR = " + formatter.format(EUR) + " SGD = " + formatter.format(SGD) + " SAR = " + formatter.format(SAR));
  
     }
  
     else if (CType.equalsIgnoreCase("SGD")){
         System.out.print("Enter Value: ");
         CValue = input.nextInt();
         US = CValue * 0.74;
         EUR = US * .88;
         RM = US * 3.92;
         SAR = US * 3.75;
  
     System.out.print("SGD = " + formatter.format(CValue) + " US = " + formatter.format(US) + " EUR = " + formatter.format(EUR) + " SAR = " + formatter.format(SAR) + " RM = " + formatter.format(RM));
  
     }
  
     else if(CType.equalsIgnoreCase("SAR")){
         System.out.print("Enter Value: ");
         CValue = input.nextInt();
         US = CValue * 0.39;
         EUR = US * .88;
         RM = US * 3.92;
         SGD = US * 1.35;
  
     System.out.print("SAR = " + formatter.format(CValue) + " US = " + formatter.format(US) + " EUR = " + formatter.format(EUR) + " SGD = " + formatter.format(SGD) + " RM = " + formatter.format(RM));
  
     }
  
  }
  </code></pre>