Question: Consider the pattern STRING1#STRING2, where neither string contains #. The STRING2 must be the reverse of STRING1. Read strings until the user enters an empty
Consider the pattern STRING1#STRING2, where neither string contains "#". The STRING2 must be the reverse of STRING1. Read strings until the user enters an empty string. The program indicates whether each string matches the pattern.
Run:
Input a string: 1&A#A&1
1&A#A&1 matches the pattern
Input a string: 1&A#1&A
1&A#1&A does not match the pattern
Input a string:madamimadam#madamimadam
madamimadam#madamimadammatches the pattern
Input a string:
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
