#include #include using namespace std; char tab[]={'+','-','*','/','%','^','(',')'}; // deklarowanie tablicy znakow int roz_tab=8; string wyr_1; //definicja inputu string wyr_2; //definicja outputu string wyr_3; string word3; int a; class Stack{ public: Stack(void) { head=NULL; }; void Push(char c) { head = new StackElement(c,head); }; //bool IsEmpty {return head==NULL}; char Pop(void) { StackElement *temp = head; char result = head->_c; head=head->_next; delete temp; return result; }; private: class StackElement { public: StackElement(char c, StackElement *next) { _c=c; _next=next; }; char GetChar() { return _c; }; char _c; StackElement *_next; }; StackElement *head; }; Stack S1; string ReadToken(string word2) { word3=""; int ilosc=0; int j=0; for(int i=0;i64))||((word2[i]<123)&&(word2[i]>96))) //jezeli jest litera word3+=word2[i]; else { if ((word2[i]<58)&&(word2[i]>47)) //jezeli jest liczba word3+=word2[i]; else { while(j<(roz_tab-1)) //jezeli jest w tablicy { if((word2[i])!=(tab[j])) j++; else { if (word2[i]==tab[6]) { ilosc++; cout<<"ilosc "<0) { string word1; while(word1[0]!=tab[6]) { word1=S1.Pop(); cout<<"zdjete "<"<>wyr_1; a=wyr_1.size(); PrintResult(wyr_1); cout<<"dlugosc to "<>wyr_3; }