Introduction to Computer Science:
Assignment 39:  Two simple programs
 Sewickley Academy, 2000-2001

See Course Home Page.
 
Date Assigned: Wed Feb-21
Date Due: Thu Feb-22

Question 1:  Read in 2 strings and output "yes" if they form a palindrome when concatenated in either
order and "no" otherwise.

     input:  foo  goof
     output:  yes

     input:  goof  foo
     output:  yes

     input:  food goof
     output:  no

Question 2:  Read in an integer N larger than 2 and output the largest prime P < N where P has no even digits.  Hint:  Check the digits from right-to-left -- find the rightmost (one's) digit (hint: use mod), test that to see if that digit is even (hint:  use mod again, only a different mod), then divide the number by 10 and continue until the number is 0.


See Course Home Page.