Implement function `CountNumbers` that accepts a sorted array of unique integers and counts the number of array elements that are less than the parameter `lessThan`

For example, `SortedSearch.CountNumbers(new int[] { 1, 3, 5, 7 }, 4)` should return 2 because there are two array elements less than 4.

Below is my approach. But the score given by online tool for this is 50%. What am i missing? 

```
using System;

public class SortedSearch
{
    public static int CountNumbers(int[] sortedArray, int lessThan)
    {
      int iRes=0;
        for (int i=0; i<sortedArray.Length; i++)
        {
            if(sortedArray[i]< lessThan)
            {
                iRes=iRes+1;
            }
        }
        return iRes;
    }

    public static void Main(string[] args)
    {
        Console.WriteLine(SortedSearch.CountNumbers(new int[] { 1, 3, 5, 7 }, 4));
    }
}

```