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

Using SPIM, write a recursive program that determines if an ASCIIstring entered

ID: 3613654 • Letter: U

Question

Using SPIM, write a recursive program that determines if an ASCIIstring entered into
the console is a palindrome. A palindrome is a string that is thesame forwards and
backwards. For example, the word radar is a palindrome, but theword Radar is not.
The main routine should input the string of ASCII characters– up to 9 alphabetic or blank
characters entered on a single line in the console window followedby a new line (carriage
return). It should then call the palindrome routine that determinesrecursively if the
entered string is a palindrome or not. Each time this recursiveroutine is entered, it should
print to the console
Entering palindrome for the i = <#> time.
where i is 1 for the first call to the palindrome routine from themain routine. After the
recursive palindrome routine has determined whether or not thestring is a palindrome, it
should return to the main routine that should then output to theconsole
The string <string> <is | is not> a palindrome.
Note that all palindrome checking must be done from within therecursive palindrome
routine (i.e., one character strings, which are always palindromes,must be detected in the
recursive palindrome routine).
By single stepping your program determine how many instructions areexecuted in your
recursive palindrome routine for 1 character, 2 character and 3character palindrome (not
counting the carriage return) inputs and report these instructioncounts as comments in
your code.

Explanation / Answer

p

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote