Trying to fix outside the bounds of array by avoiding using if, else, if else and switch statements as I can only user if once
<p>How can I make it so that if the quantityPurchased is greater than or equal to 200 it does not go out of the bounds of array without using an if, if else, else or a switch statement.</p>

<pre><code>static double DeterminePercentage(int quantityPurchased)
{
    double[] quantity = { 1, 11, 50, 100, 200 };
    double[] discount = { 0, 7.5, 15, 17.5, 20 };
    int x = 0;
    for (int i = 0; i &lt; quantity.Length; i++)
    {
        if (quantityPurchased &gt;= quantity[i] &amp;&amp; quantityPurchased &lt; quantity[i + 1])
        {
            x = i;
        }
        break;
    }

    return discount[x];
}
</code></pre>
