title: java calculator loop not working properly
body: <p>For some reason my calculator won't wait for user input to finish the do while loop. I'm very new to java coding (currently only been doing it for a few hours). I want the user to be able to do more math before the program closes instead of having to reopen it every time they want to use it (obviously I don't mean anything serious by this I just want to learn and I think this will help.</p>
  
  <p>heres my code</p>
  
  <pre><code>import java.util.Scanner;
  
  
  public class calculator {
  public static void main(String[] args){
      double Answer;
      String op;
      double num1;
      double num2;
      String again;
      boolean yesorno = true;
  
              Scanner input = new Scanner(System.in);
  
               while (yesorno = true){
                  System.out.print("What opperation would you like to preform? +,-,*,/, :");
                  op = input.nextLine();
                  System.out.print("What is the first number? : ");
                  num1 = input.nextDouble();
                  System.out.print("And the seccond number? : ");
                  num2 = input.nextDouble();
                  if (op.equals("+")) {
                      Answer = (num1 + num2);
                      System.out.println(Answer);
  
                  } else if (op.equals("-")) {
                      Answer = num1 - num2;
                      System.out.println(Answer);
  
                  } else if (op.equals("*")) {
                      Answer = num1 * num2;
                      System.out.println(Answer);
  
                  } else if (op.equals("/")) {
                      Answer = num1 / num2;
                      System.out.println(Answer);
  
                  }
                  System.out.println("Would you like to do any more math?");
                  again = input.nextLine();
                  if (again.equals("yes")) {
                      yesorno = true;
                  } else if (again.equals("no")) {
                      yesorno = false;
                      System.out.print("have a good day!");
  
                  }
              } while (yesorno = true);       
  }
  }
  </code></pre>
  
  <p>please ignore the akward formatting at the beggining and end of this code.</p>