Оптимальні програми
')' : Priority:=0;
'-' : Priority:=1;
'+' : Priority:=1;
'*' : Priority:=2;
'/' : Priority:=2;
'^' : Priority:=3;
End;
End;
Function ITP(Ex:String):String;
Var i,j:Integer;
Rez:String;
Begin
Rez:='';
Stek[1]:='e'; j:=1;
For i:=1 To Length(Ex) Do
Begin
If Ex[i] in ['A'..'Z','a'..'z'] Then Rez:=Rez+Ex[i];
If Ex[i]='(' Then Begin j:=j+1; Stek[j]:='('; End;
If Ex[i]=')' Then
Begin
While Stek[j]<>'(' Do Begin Rez:=Rez+Stek[j]; Dec(j); End;
Dec(j);
End;
If Ex[i] in ['+','-','*','/','^'] Then
Begin