title: Problem with while loop and not getting the expected output?
body: <p>This is a Java question and which I have a problem with the while loop. The program must allow the customer to enter the number of liters of petrol they wish to purchase and the liter value is $1.75. Then, for each
  liter of petrol up to the quantity that the customer has entered, the program must display a
  running total. </p>
  
  <p>and this is the expected output and which I am not getting </p>
  
  <pre><code>Please Enter the Litres of Petrol (a whole number): 20
  Litre 0: $0.0
  Litre 1: $1.75
  Litre 2: $3.5
  ...
  Litre 19: $33.25
  Litre 20: $35.0 
  </code></pre>
  
  <p>and this is my code so far.</p>
  
  <pre><code>public static void main(String[] args) {
      Scanner kb = new Scanner(System. in );
      int numOfLiter;
  
      System.out.println("Please enter the liters of Petrol: ");
      numOfLiter = kb.nextInt();
  
      double pricePerLitre = 1.75;
      int count = 0;
  
      while (count &lt;= 10) {
          Double total = pricePerLitre + count;
          System.out.println("Liter " + count + ": " + total);
  
          count++;
  
      }
  }
  </code></pre>