Docsity

Program Assignment 1 for COSC 2410 - Fall 2005: Palindrome Checker, Assignments of Computer Architecture and Organization

Toggle sidebar
bg1
COSC 2410 Fall 2005
Program Assignment 1
Due: 09/29/2005
Write a program that will read a line of text and determine whether
or not the text is a palindrome. A palindrome is a word or sentence
that spells exactly the same thing both forward and backward. For
example: the string “anna” is a palindrome, while “ann” is not.
Requirements (100 points):
1. Your program will initially display “please input string” on the console. The
program accepts an alphanumeric string of no more than 80 characters to be
terminated by a carriage return (enter) signal. Your program will echo the
input string character by character on the console. It will then type out “The
string “….” is (not) a palindrome. It then will go back to the initial state by
displaying “please input a string” again.
2. Write clear and complete document for your program.
3. Submit both electronic copy via email and hard copy in the lab.
4. Refer “Lab Syllabus” for detail submitting requirements.
Bonus:
(You will get the extra 30 points if you can finish the following functions)
1. Ignore Uppercase and Lowercase. “Anna” is a palindrome. (10 points)
2. In addition to 1. ignore all the spaces in the input string. “A Santa at NASA”
is recognized as a palindrome. (10 points)
3. In addition to 2, ignore the punctuations in the input string. “So, camera
solos are MacOS?” is recognized as a palindrome. (10 points)

Partial preview of the text

Download Program Assignment 1 for COSC 2410 - Fall 2005: Palindrome Checker and more Assignments Computer Architecture and Organization in PDF only on Docsity!

COSC 2410 Fall 2005

Program Assignment 1

Due: 0 9 /29/

Write a program that will read a line of text and determine whether

or not the text is a palindrome. A palindrome is a word or sentence

that spells exactly the same thing both forward and backward. For

example: the string “anna” is a palindrome, while “ann” is not.

Requirements (100 points):

  1. Your program will initially display “please input string” on the console. The program accepts an alphanumeric string of no more than 80 characters to be terminated by a carriage return (enter) signal. Your program will echo the input string character by character on the console. It will then type out “The string “….” is (not) a palindrome. It then will go back to the initial state by displaying “please input a string” again.
  2. Write clear and complete document for your program.
  3. Submit both electronic copy via email and hard copy in the lab.
  4. Refer “Lab Syllabus” for detail submitting requirements.

Bonus:

(You will get the extra 30 points if you can finish the following functions)

  1. Ignore Uppercase and Lowercase. “Anna” is a palindrome. (10 points)
  2. In addition to 1. ignore all the spaces in the input string. “A Santa at NASA” is recognized as a palindrome. (10 points)
  3. In addition to 2, ignore the punctuations in the input string. “So, camera solos are MacOS?” is recognized as a palindrome. (10 points)