All pastes #220490 Raw Edit

Someone

public c v1 · immutable
#220490 ·published 2006-10-25 05:57 UTC
rendered paste body
int main(int argc, char *argv[]) { //printf("I am in main"); // int puzzle[9][9];  // Puzzle data structure // int i, j;          // Iteration variables        char values[9] = {0}; //going to hold one line of nums        int location = 0; //keeps track of how much is filled        int stop = 0;        int nine = 0;        while( stop == 0 ) {                printf("Im inside while");                char c = '0';                scanf("%c", &c);                printf("I scanned the value %c", c);                        if( c >= 48 && c <= 57 ){                        printf("I got inside the if  between 1-9 clause");                        values[location] = c; //stick it in array at  next open space                        location++;                        nine++; //so know when to end forloop                        if( nine >= 9 ) // Check if we have grabbed all our numbers                        {                                stop = 1;                        }                }        }printf( "\n This is what's in the array: \n" );printf( "\'" );int i = 0;        for( i = 0; i < 9; i++ ){                printf( "%c", values[i] );        }printf( "\'\n" ); return 0;}