Q:

C language:“Else without a previous if” when using else-if syntax to calculate the solutions to a linear system

This is a C language program
The following program is about calculate the the solutions for the linear system: a1x+b1y=c1,a2x+b2y+c2.
I checked the syntax of else-if,but the compiler still tells me  “Else without a previous if",I got no idea what's happening.

I wonder whether you could give some instructions. 
Thanks a lot!
#include<stdio.h>
#include<math.h>
//this program is used to calculate the solutions for the linear system: a1x+b1y=c1,a2x+b2y+c2//
int main()
{
    float a1,a2,b1,b2,c1,c2,x,y;
    printf("Enter values for a1,a2,b1,b2,c1,c2:");
    scanf("%f %f %f %f %f %f",&a1,&a2,&b1,&b2,&c1,&c2);

    if ((a1*b2-a2*b1) <= 0.01 || (a1*b2-a2*b1) == 0);//if the denominator is too small//
    {
    printf("The denominator is 0.\n");
    }
    else
    {
        x = (b2*c1-b1*c2)/(a1*b2-a2*b1);
        y = (a1*c2-a2*c1)/(a1*b2-a2*b1);
    }
    printf("x = %f",x);printf("y = %f\n",y);
    return 0;
}

A:

if ((a1*b2-a2*b1) <= 0.01 || (a1*b2-a2*b1) == 0);//if the denominator is too small//

Because of that semicolon after the if statement, that semicolon is now the body of the if statement. Yes, a spare semicolon is actually legal code - it just does nothing. Most compilers will optimize it away instead of translating it to actual machine code that does nothing (which also exists).
So basically, that snipped says "if (a1*b2-a2*b1) <= 0.01) or ((a1*b2-a2*b1) == 0)", then do nothing. And else... also do nothing. Your compiler will probably optimize away this line completely.
{
printf("The denominator is 0.\n");
}

As it is not part of the if statement, this now just always prints. The braces around it are legal even without an if.
So now the following else block here
else
{
    x = (b2*c1-b1*c2)/(a1*b2-a2*b1);
    y = (a1*c2-a2*c1)/(a1*b2-a2*b1);
}

...is completely alone, because the if is over and done at this point. That's why you get the error. The solution to your problem is to remove the semicolon at the end of the line where your if statement starts.

It is the ";"after the sentence(if) which create the problem. If there
  is an ";"after "if",that means the end of the sentence "if",so the
  sentence of "else" will not be regarded as part of the sentence"if".

Exactly. The reason why the error message is so confusing is because the actual mistake of adding that semicolon didn't instantly make that statement invalid, but resulted in a different, valid construct that kept being valid all the way through the block with the printf and only stopped making sense at the else.

