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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!