while((c = getchar()) != EOF) { if(c >= ZERO && c <= NINE) { c -= 48; if(!(c >= 1 && c <= 6)) { printf("Value out of Range.\n"); } count++; array[i] = c; precedingWhitespace = FALSE; if(count > 5) { printf("Incorrect Number of Values.\n"); } else if(c == SPACE || c == TAB) { if(precedingWhitespace == FALSE) { precedingWhitespace = TRUE; } } else { printf("Incorrect Input Format: %d\n", c); } } i++; }