title: using JAVA Loop for math calculation
body: <p>I had tried to do some calculations and something doesn't quite add up. I am trying to achieve the screenshot below
  <a href="https://i.stack.imgur.com/jhBzC.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/jhBzC.png" alt="expected"></a></p>
  
  <p>but this is what i'm getting</p>
  
  <p><a href="https://i.stack.imgur.com/LgoFw.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/LgoFw.png" alt="result"></a></p>
  
  <p>Please I need some help, this is what I have done so far</p>
  
  <pre><code>public class VelocityFall
  {
  public static void main (String [] a)
  {
      Scanner s = new Scanner (System.in);
      System.out.print("This program prints a table that shows each \nsecond,"     
    +
      "height from the ground (meters), and the velocity (m/s)\n of a free-falling" + 
      "object from an initial height (metres).\nPlease input the Initial Height H:  ");
  
  
      // input/get the value of H from the keyboard
      double H = s.nextDouble ();
      // we need to design/output the table by using println with lines and tabs (\t)
  
      System.out.println ("------------------------------------------");
      System.out.println (" t(s)\t\tHeight(m)\t\tVelocity(m/s)");
      System.out.println ("------------------------------------------");
  
      //we now require a for loop
      for (int t = 0; t&lt;=15; t++)
     {
      // we are now going to calculate and output the velocity and decreasing  
      height
     double velocity = 9.8*t;
     H = H-(0.5*9.8*Math.pow(t,2));  
     System.out.println(t + "\t\t" + H + "\t\t" + velocity);
  
     }
    }
   }
  </code></pre>