C++ How to Check if Array contents can add up to a specific number : <p>Let's say I got this Array:</p>

<pre><code>int myArray[] = {2,5,8,3,2,1,9};
</code></pre>

<p>is ther any way I could check if some of the contents can add up to 20? I managed to check if any two values add up to 20 but I just don't know how to handle it if is irrelevant how many values it needs.</p>

<p>Thank you for your help.</p>
