Question: Exercise 2: Write a program that does the following: input a string from the user, then using a state machine, determine if the sequence abcd


Exercise 2: Write a program that does the following: input a string from the user, then using a state machine, determine if the sequence "abcd" is contained in the string. In this case, your program will loop through each character in the string. The state machine is the following char==a char=ra chara char==b char=a char!=a orb char=ra start b char!=a or C char!=a char==C char!=a ord char==d char!=a
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
