Оптимальні програми
End;
Function IsVariable(c:Char):Integer;
Var i:Integer;
Begin
For i:=1 To N Do
If Tab[i].c=c Then
Begin
IsVariable:=i;
Exit;
End;
IsVariable:=0;
End;
Function MakeOperation(p1,p2:Real; Op:Char):Real;
Begin
Case Op Of
'+' : MakeOperation:=p1+p2;
'-' : MakeOperation:=p1-p2;
'*' : MakeOperation:=p1*p2;
'/' : MakeOperation:=p1/p2;
'^' : MakeOperation:=Exp(Ln(p1)*p2);
End;
End;
Function CalculatePostfix(Ex:String):Real;
Var i,j:Integer;
p1,p2:Real;