title: Trouble with If statements in While loops
body: <p>The if section of this code does not run properly when combined with the for loop. The printf command is never executed regardless of weather the if statement is satisfied. I have tried implementing both while and for loops and no luck. The purpose is user input to an array of only numeric values.
  Below is the problematic portion of my C code. I've been learning C for about a week so excuse my ignorance :).</p>
  
  <pre><code>int value;
  int containsValues[5];
  int x = 0;
  int i = 0;
  
  for (x&lt;5;x++)
  {
    printf("Enter value: \n");
    scanf("%d", &amp;value);
  
    if  (isdigit(value))
     printf("A numeric value must be entered\n");
    else
     containsValues[x] = value;
  }
  </code></pre>