Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- char input[256];
- DFA dfa = oneA();
- while(1){
- printf("nEnter an input: ");
- scanf("%s", input);
- if (strcmp(input, "quit") == 0){
- break;
- }
- printf("nResults for input "%s": ", input);
- printf("%s", DFA_execute(dfa, input) ? "true" : "false");
- }
- Testing DFA that recognizes exactly "zxy"
- Enter an input: *zxy*
- Results for input "zxy": true
- Testing DFA that recognizes exactly "zxy"
- Enter an input: *zxy*
- zxy
- Results for input "zxy": true
Add Comment
Please, Sign In to add comment