CIS 162 - Programming I - Section 5832
Programming Assignment #2
Due Thursday, May 4, 2006

The Palindrome Problem

A palindrome is a word or a phrase spelled the same forward and backward. Two sample palindromes are:

Write a C# program that asks the user for a phrase. Put the phrase into an array of characters and check if it is a palindrome. You will have to remove special (nonalphabetic) characters, storing only alphabetic characters to a second character array. You also must convert the characters to all uppercase or all lowercase as you store them. The first palindrome might become: MADAMIMADAM

Using string functions or one or more for or while loops, you now can test the phrase to determine whether it is a palindrome. Make the screen input and output attractive and user friendly. Don't forget to break the program into functions to do the separate tasks. Sample output should look like this: