Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Please write me this program in any language (C, JAVA, PYTHON, C++, etc). Or at

ID: 3628377 • Letter: P

Question

Please write me this program in any language (C, JAVA, PYTHON, C++, etc).
Or at least give me some idea how I can do it.
Here is a description.

Input
Input is a stream of characters from stdin. The newline character terminates a “string” to the acceptor.
If a line has only the word <next>, current program is terminated and the next program is read in.


Output
The output is a single word on stdout, either yes or no. No debugging output is allowed on stdout.


Alphabet
All printable ASCII characters are considered legal. Any non-printable character is considered terminate the current input.


Programs
Programs are lines (terminated with a newline) with three fields that are interpreted as
Current State symbol | Current Input Character | Next State symbol
If the current state symbol is <stop>, then the program has been loaded.


Emulator
The emulator is a program in your favorite language that can use the matrix loaded by the initial loader to emulate a deterministic FSA. See your text and any online sources you care to.

Explanation / Answer

algoirthm will be as follows. :

step 1: get line of characters:

step 2: check from " " (space ) character in line of characters.

step 3: if space is present means it contain more than one word.

step 4: if no space is there means only one word stdout this word

step 5 : go to next prgoram