title: Changing an if else statement to a switch statement
body: <p>I was wondering what would be the best way to convert this if statement within a do while loop to a switch statement within a do while loop.</p>
  
  <p>What would be a better way to tighten up this code?</p>
  
  <pre><code>    do{
  
  
          currency = keyboard.nextInt();
  
          if (currency == 1)
          {
              sterling = euros * 0.79;
              System.out.printf("£ %.2f", sterling);
          }
          else if (currency == 2)
          {
              usDollars = euros * 1.28;
              System.out.printf("$ %.2f", usDollars);
          }
          else if (currency == 3){
              auDollars = euros * 1.44;
              System.out.printf("$ %.2f", auDollars);
          }
          else{
              System.out.printf("Invalid Option");
          }
  
  
          System.out.printf("\nWould you like to go again");
          System.out.printf("\n1. Yes\n2  No");
          repeat = keyboard.nextInt();
  
          if (repeat ==  2){
              System.out.printf("Exit Program");
              System.exit(0);
          }
      }while(repeat == 1);
  </code></pre>