Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int wyrażenie (char*str)
- {
- int w,c,o;
- c=czynnik(str);
- if(c>0)
- {
- o=operacja(str+c);
- if ( o>0)
- {
- if ( (w=wyrażenie( str+c+1)) > 0) return c+o+w; //Tutaj musze podawać +2-+22 zamiast +2-22
- return c+o;
- }
- return c;
- }
- return 0;
- }
- int czynnik(char*str)
- {
- int l,w;
- if((l=(liczba(str)))>0 ) return l;
- else if ((*str=='(') && ((w=(wyrażenie(str+1))) >0) && (((*str)+1)==')')) return w+2;
- return -1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement