title: do-while to make a yes or no answer? java
body: <p>My current objective is to make this line of code continue to run over again as long as the "yes" is the true, or if it is "no" then stop, or if it is invalid prompt the user to make a correct selection. I'm completely lost on what to do.</p>
  
  <pre><code>    import java.util.Scanner;
  
      public class Temperature
      {
       public static void main(String[] args){
  
          Scanner input = new Scanner (System.in);
          System.out.println("Enter a number, a space and F to convert from degF to degC and C to convert to degC to degF");
          double deg = input.nextDouble();
          String letter = input.next().toUpperCase();
          char dg = letter.charAt(0);
          //String prompt;
         tempLoop:
          do{
              if( dg == 'C'){
                  double cTemp= (deg-32)*5.0/9.0;
                  System.out.printf("%f degC converted to degF is %.2f%n",deg, cTemp );;
              }
              else if(dg == 'F'){
                  double fTemp = (deg*9/5) + 32;
                  System.out.printf("%f degF converted to degC is %.2f%n",deg, fTemp );
                  continue;
              }
              else{
                  System.out.println("That character does not correspond to a valid unit of measure ");
                  break;
              }
          }while(!(dg == 'C' || dg == 'F'));
          System.out.println("Would you like to continue?(yes/no)"); 
        }
       }
  </code></pre>