/* p5.c */ #include int main() { int counter; // the number of three's we've seen int value; // the value just read int howmany; // howmany values were read counter = 0; howmany = fscanf(stdin, "%d", &value); while (howmany == 1) { if (value == 3) counter = counter + 1; howmany = fscanf(stdin, "%d", &value); } fprintf(stdout, "The number of 3's was %d \n", counter); return(0); }