All pastes #428176 Raw Edit

Someone

public text v1 · immutable
·published 2007-04-07 10:22 UTC
rendered paste body
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++;
}