Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (statement[i]=='0' || statement[i]=='1')
- {
- if (statement[i+1]!='&' || statement[i+1]!='|' || statement[i+1]!=')')
- return 0;
- }
- if (statement[i]=='&' || statement[i]=='|')
- {
- if (statement[i+1]!='1' || statement[i+1]!='0' || statement[i+1]!='(')
- return 0;
- }
- if (statement[i]=='(' && statement[i+4]==')')
- {
- .......
- and the following loop:
- for (t=i; t<length; t++)
- {
- if (statement[t]==')')
- {
- return check_statement (statement, length, t-i+1);
- }
- }
- }
- return 1;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement