title: My second if and else if statement produces the wrong answer
body: <p>For some reason I cant get the right code for 4 stand tickets which equates to 100 (without oap/child discount and over 5 ticket discount with the cost of 4 dinners bringing the total to 180 which is then multiplied by 1.21 to equal 217.9. If I put a System.out.println(vatTotalNoAgeLess5); outside the second if block it will print 217.8 yet if I dont it gives me the cost of 4 oap/child tickets + 4 dinners * 1.21 which is 195.65.</p>
  
  <pre><code>public static void main(String[] args) {
      //data dictionary
      double standT, terraceT, grossTick, handlingFee, ticketDiscount, flatFee, totalCost, agetick, over5tick,
      vatTotal, totaltick, dinnerPrice, dinnerTotal, vatTotalForAge, vatTotalNoAgeLess5;
  
      Scanner in = new Scanner(System.in);
      //gathering basic inputs from user  
      System.out.println("Input your name ");
      String name = in.next();
      System.out.println("Input your mobile number ");
      String mobile = in.next();
      System.out.println("How many stand tickets do you want? ");
      int standTick = in.nextInt();
      System.out.println("How many terrace tickets do you want? ");
      int terraceTick = in.nextInt();
      System.out.println("OAP/Student tickets? y/n");
      String ageDiscount = in.next();
      //basic fees as variables
      standT = 25 * standTick;
      terraceT = 20 * terraceTick;
      handlingFee = 7.50;
      dinnerPrice = 20;
  
      //defining the total cost variables
      grossTick = terraceT + standT;
  
      if(ageDiscount.equals("Y") || ageDiscount.equals("y"))
      {
          //System.out.println(grossTick);
          agetick = grossTick * 0.85;
          System.out.println("Before vat the total is " + agetick);
      }
      else if (ageDiscount.equals("N") || ageDiscount.equals("n"))
      {
          System.out.println("Before vat the total is " + grossTick);
      }
      else if(standTick + terraceTick &gt;= 5)
      {
          over5tick = grossTick * 0.82;
          System.out.println("Before vat the total is " + over5tick);
      }
      else if (standTick + terraceTick &lt; 5 )
      {
          System.out.println("Before vat the total is " + grossTick);
      }
      else if (ageDiscount.equals("Yes") || ageDiscount.equals("yes")  &amp;&amp; standTick + terraceTick &gt;= 5)
      {
          over5tick = grossTick * 0.82;
          System.out.println("Before vat the total is " + over5tick);
      }
  
  
      System.out.println("Will you be having dinner? y/n ");
      String havingDinner = in.next();
  
      if(havingDinner.equals("Y") || havingDinner.equals("y") || ageDiscount.equals("Y") || ageDiscount.equals("y"))
      {
          agetick = (grossTick * 0.85);
          dinnerTotal = dinnerPrice * (standTick + terraceTick);
          vatTotalForAge = ((dinnerTotal + agetick) * 1.21);
          System.out.println(vatTotalForAge);
      }
      else if (havingDinner.equals("Y") || havingDinner.equals("y")||ageDiscount.equals("N") || ageDiscount.equals("n"))
      {
          dinnerTotal = dinnerPrice * (standTick + terraceTick);
          vatTotalNoAgeLess5 = ((dinnerTotal + grossTick) * 1.21);
          System.out.println(vatTotalNoAgeLess5);
      }
  
  
  
      /*
      if(havingDinner.equals("Y") || havingDinner.equals("y")|| ageDiscount.equals("Y") || ageDiscount.equals("y")) 
      {
          agetick = (grossTick * 0.85);
          dinnerTotal = dinnerPrice * (standTick + terraceTick);
          vatTotalForAge = ((dinnerTotal + agetick) * 1.21);
          System.out.println(vatTotalForAge);
      }
  
      else if(havingDinner.equals("Y") || havingDinner.equals("y") || ageDiscount.equals("N") || ageDiscount.equals("n"))
      {
          dinnerTotal = dinnerPrice * (standTick + terraceTick);
          vatTotalNoAgeLess5 = ((dinnerTotal + grossTick) * 1.21);
          System.out.println("is");
  
      }
      dinnerTotal = dinnerPrice * (standTick + terraceTick);
      vatTotalNoAgeLess5 = ((dinnerTotal + grossTick) * 1.21);
      System.out.println(vatTotalNoAgeLess5);
  
  
  
      /*
      if( dinner &gt; 0 || ageDiscount.equals("Yes") || ageDiscount.equals("yes"))
      {
          System.out.println("Total of dinner and vat is " +(( agetick + dinner)*1.21));
      }
      else if (dinner &gt; 0||ageDiscount.equals("No") || ageDiscount.equals("no"))
      {
      System.out.println("Total of dinner and vat is " + ((grossTick + dinner)*1.21));
      }
      else if(dinner &gt; 0||standTick + terraceTick &gt;= 5)
      {
          System.out.println("Total of dinner and vat is " + (over5tick*1.21 + dinner));
      }
      else if (dinner &gt; 0 ||standTick + terraceTick &lt; 5 )
      {
          System.out.println("Total of dinner and vat is " + ((grossTick*1.21) + dinner));
      }
      else if (dinner &gt; 0||ageDiscount.equals("Yes") || ageDiscount.equals("yes")  &amp;&amp; standTick + terraceTick &gt;= 5)
      {
          System.out.println("Total of dinner and vat is " + (over5tick*1.21 + dinner));
      }
      else if (dinner &lt; 1 || ageDiscount.equals("No") || ageDiscount.equals("no"))
      {
      System.out.println("Total including and vat is " + grossTick*1.21);
      }
      else if(dinner &lt; 1 ||standTick + terraceTick &gt;= 5)
      {
          System.out.println("Total including and vat is " + over5tick*1.21);
      }
      else if (dinner &lt; 1 ||standTick + terraceTick &lt; 5 )
      {
          System.out.println("Total including and vat is " + grossTick*1.21);
      }
      else if (dinner &lt; 1 || ageDiscount.equals("Yes") || ageDiscount.equals("yes")  &amp;&amp; standTick + terraceTick &gt;= 5)
      {
          System.out.println("Total including and vat is " + over5tick*1.21 );
      }
      */
  }
  </code></pre>
  
  <p>}</p>