title: How can I check if a array contains multiple elements?
body: <p>I am trying to see if an array contains multiple values at any given index in the array, and if it does I want it to return true and if not return false. I want it to return true when it finds the numbers 1-9 and false if it does not.</p>
  
  <pre><code> bool isSolved(int a[], int size) {
      int count = 0;
      for (int i = 1; i &lt; 10; i++) {
          if (hasNum(a,size,i)) {
              count++;
          }
      }
      if (count == 9) {
          return true;
      }
      else { 
          return false;
      }
  }
  
  bool hasNum(int a[], int size, int num) {
  
      for (int i = 0; i &lt; size; i++) {
          for (int j = 0; j &lt; size; j++) {
              if (a[j] == num) {
                  return true;
              }
              else {
                  return false;
              }
          }
      }
  }
  </code></pre>
  
  <p>This is what I have so far and it just gets stuck and never ends.</p>