title: How to select multiple elements in an array with C?
body: <p>Is there a way to select multiple elements in array using one line of code in C?  For instance, say I had the following code (assuming I already asked the user for twenty numbers, the first ten I asked to be positive and the last ten I asked to be negative):</p>
  
  <pre><code>if (myArray[0 through 9] &gt; 0)
  {
    printf("Thank you for providing positive numbers!");
  }
  else
  {
    printf("Sorry, please try again!");
  }
  
  if (myArray[10 through 19] &lt; 0)
  {
    printf("Thank you for providing negative numbers!");
  }
  else
  {
    printf("Sorry, please try again!");
  }
  </code></pre>
  
  <p>What code could I substitute for "through"?  I am fairly new to this language, and have never heard of a way of doing so.  I know that with this particular code I could make two arrays, one for the positive numbers and one for the negative numbers, but I am curious to know for other programming projects.</p>
  
  <p>Thank you for reading and answering!</p>