title: TestDome: my solution works but I am only getting %50 right and not %100?
body: <p>This is the scenario question:</p>
  
  <p>A frog only moves forward, but it can move in steps 1 inch long or in jumps 2 inches long. A frog can cover the same distance using different combinations of steps and jumps.</p>
  
  <p>Write a function that calculates the number of different combinations a frog can use to cover a given distance.</p>
  
  <p>For example, a distance of 3 inches can be covered in three ways: step-step-step, step-jump, and jump-step.</p>
  
  <pre><code>public class Frog{
  public static int numberOfWays(int input) {
  
      int counter = 2;
  
      int x = 0;
  
      for (int i = 1 ; i&lt; input -1; i++ ){
  
          x = i + counter;
          counter = x; 
      }
      if (input &lt;3){
          x = input;
  
      }
      return x;
  
    }
  
  public static void main(String[] args) {
      System.out.println(numberOfWays(10));
   }
  }
  </code></pre>
  
  <p>This solution only gives me %50 right not sure why its not %100 right, I tested it with other values and returns the right results.</p>