Pascal help plss (:() : This is the code:

<!-- begin snippet: js hide: false console: true babel: false -->

<!-- language: lang-html -->

    program pi18;
    var a,b,c,P:real;
    begin
    read(a,b,c);
    if(a+b<c) or (b+c<a) or (a+c<b) then
    writeln('Nu exista asa triunghi')
    else
    begin
    P:=a+b+c;
    if(a=b) and (a=c) then write('Triunghiul este echil')
    else
    if(sqr(a) = sqr(b) + sqr(c)) or (sqr(b) = sqr(a) + sqr(c)) or (sqr(c) = sqr(a) + sqr(b)) then
    write('Triunghiul este dreptunghic'); readln();
    else
    write('Triunghiul este arbitrar'); readln();
    end;
    writeln('Perimetrul este: ', P);
    end.

<!-- end snippet -->

And I have this error: Syntax error, ";" expected but "ELSE" found

This code is for:
- says the perimeter of a triangle.
- compare if the a,b,c are numbers for some types of triangles.