1. Решается простым div'ом (помоему)
2.
Function GetX(a,b:real):real;
begin
if a>b then begin
if b=0 then showmessage('Делить на ноль низя!') else Result:=-5+a/b;
end else
if a=b then begin
Result:=45;
end else
if a<b then begin
if b=0 then showmessage('Делить на ноль низя!') else Result:=(3*a-6)/b;
end;
end;
|