C++
[1] A stack can be used to recognize certain types of patterns.Consider the pattern STRING1#STRING2, where neither string contains”#”. The STRING2 must be the reverse of STRING1. Write a programthat reads strings until the user enters an empty string. Theprogram should indicate whether each string matches thepattern.
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#madamimadam matches the pattern
Input a string:
[2] Write a program that prompts the user to enter a non-negativedecimal number and a base in the range 2 <= base <= 16. Writea function multibaseOutput() that displays the number in
PayPal Gateway not configured
PayPal Gateway not configured