Note the following is probably a mistake:
Code:
for (i = 0; i < N; i++);
{
foo();
}
In this code, foo() gets called exactly once, regardless of N. Note the semicolon in this case is a "Null statement" to do nothing inside the for loop.
That, and what the other posters said regarding the familiar math expression LOW < x < HIGH
In C, this becomes: (LOW < x && x < HIGH)
As far as your code, I don't understand what you want to do with BIL. For checking whether the user enters 2 floats, the scanf() function should return 2:
Code:
printf("Give me two numbers: ");
while(scanf(" %f %f",&num_one, &num_two) == 2)
{
getchar(); // discard extra whitespace
math_answer = (num_one-num_two)/(num_one*num_two);
printf("Here is the (first # - the second #) divided by their product: %f\n", math_answer);
printf("Give me two more numbers or q to quit: ");
}
printf("Quitting :)");