Quote Originally Posted by xviddivxoggmp3
Code:
	printf("enter two numbers: ");
	fflush(stdout);

/*flushes the buffer due to multiple loops 
and the possibility of multiple inputs.*/
Not exactly.....stdout is by default buffered, so it wont print anything until it reaches a \n (newline character) fflush prints everything thats in the buffer.

} while (sscanf(buf, "%d %d", &input[0], &input[1]) != 2);
/*loop exit test. if sscanf returns two successful
items of data, then exit. Place data from buff into
array locations addressed by input. Question: does
this exit after two letters are intered in sequentially,
or does it exit upon hitting two keys at once? I do
not have a compiler to test this. */
sscanf will return 2 when two items are entered with a space seperating them. like this:

enter two numbers: 2 2