Advertisement
Guest User

Untitled

a guest
Jun 26th, 2019
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. if (statement[i]=='0' || statement[i]=='1')
  2. {
  3. if (statement[i+1]!='&' || statement[i+1]!='|' || statement[i+1]!=')')
  4. return 0;
  5. }
  6. if (statement[i]=='&' || statement[i]=='|')
  7. {
  8. if (statement[i+1]!='1' || statement[i+1]!='0' || statement[i+1]!='(')
  9. return 0;
  10. }
  11. if (statement[i]=='(' && statement[i+4]==')')
  12. {
  13. .......
  14. and the following loop:
  15. for (t=i; t<length; t++)
  16. {
  17. if (statement[t]==')')
  18. {
  19. return check_statement (statement, length, t-i+1);
  20. }
  21. }
  22. }
  23. return 1;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement