Introduction to Computer Science:
Assignment 36:  Palindromes
 Sewickley Academy, 2000-2001

See Course Home Page.
 
Date Assigned: Tue Feb-6
Date Due: Wed Feb-7

A palindrome is a word which reads the same forwards as backwards.  Examples include madam, abacaba, and bob.  Counter-examples (words that are not palindromes) include madonna, abacab, and bartholomew.

Your task is to read in a word (which will be terminated by a period -- '.') and to output "Palindrome!" if it is a palindrome, and "Not a palindrome" otherwise.

Hint:  We don't yet know how to read in a word in one fell swoop, but we can read it in character-by-character...  (Actually, some of you do know how to use apstring, and if so you certainly may.)

Good luck.

DK


See Course Home Page.