title: why when i enter less than 201 its also run the last if statement i don't enter understand
body: <p>I do not understand the reason why this code is not working proper when I enter less than 200 then last if statement also executed can anyone tell the problem.</p>
  
  <p>This the main problem of this code is not working properly</p>
  
  <pre><code>    public class main {
      public static void main(String args[]){
      Scanner input=new Scanner(System.in);
  
      double unit   ;
      double extra;
      double total_unit;
  
      System.out.println("enter total unit");
  
      unit=input.nextInt();
  
      if(unit &gt;=1 &amp;&amp; unit &lt;=200){
  
      unit=unit *8;
  
      System.out.println(" bill of 200 units is "+ unit);
  
      }
  
      if(unit  &gt;=201 &amp;&amp; unit &lt;=300){
  
       extra = unit - 200;
  
       extra= extra * 10;
  
       total_unit = 200 * 8 + extra;
  
       System.out.println("Total bill is: " + total_unit); 
  
      }
  
      if(unit &gt;=301 &amp;&amp; unit&lt;=400){
  
       extra=unit-300;
  
      extra=extra *15;
  
      total_unit=200*8 +100*10+ extra;
  
      System.out.println("total bill of more than 300 units is "+total_unit);
  
      }  
  
      if(unit &gt;=401 &amp;&amp; unit&lt;=500){
  
       extra=unit-400;
  
      extra=extra*20;
  
       total_unit=200*8+ 100*10 + 100*15 + extra ;
  
      System.out.println("total bill between 401 to 500 units" + total_unit);
  
          }
  
       if(unit&gt;501){  
  
       extra=unit-500;
  
      System.out.println("unit consumed  " + extra + "  that above");
  
      extra=extra *25;
  
      System.out.println("------------unit above 500 bill-------- \n"   +extra);
       total_unit=200*8 + 100*10 +100*15 +100*20 + extra;
  
      System.out.println("---------total bill----------\n  " +     total_unit);
  
      }
  
      }
  
      }
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/wlVUA.png" alt=""></p>