#C7228. Symmetric String Checker
Symmetric String Checker
Symmetric String Checker
Given a string, determine if it is symmetric (palindromic) after removing all non-alphabetical characters and ignoring case. A string is considered symmetric if it reads the same forwards and backwards after cleaning.
The program reads multiple lines from the standard input and processes each line until a line containing only a single asterisk '*' is encountered. For each valid input line, the program outputs either "Symmetric" or "Not Symmetric".
Note: When cleaning the string, only letters [a-zA-Z] are considered and case is ignored.
inputFormat
Multiple lines are provided via standard input. Each line is a string. The input terminates when a line containing only a single asterisk '' is encountered. The terminating '' line should not be processed.
outputFormat
For each input line (except the terminating '*'), output a line containing "Symmetric" if the cleaned string is the same forwards and backwards; otherwise, output "Not Symmetric". Each output should be printed to a new line.## sample
A man, a plan, a canal, Panama!
Was it a car or a cat I saw?
No 'x' in Nixon
*
Symmetric
Symmetric
Symmetric
</p>