C Programming Language (CS2402): HW3

Instructor: J.-S. R. Jang


Due date: Oct. 7, 1996
  1. (30%) Exercise 3.35 (page 98) of Chapter 3. Your program should have an infinite loop that get a positive five-digit integer from the keyboard at each iteration, and stop whenever the given integer is 0. If the given integer is negative, your program should print an error message (see below). A sample output (with italic user input) should look like this: this:
         Please input a positive five-digit integer: 12345
         12345 is not a palindrome.
         Please input a positive five-digit integer: 12321
         12321 is a palindrome.
         Please input a positive five-digit integer: -23010
         This program does not handle negative numbers. Sorry!
         Please input a positive five-digit integer: 0
         Thank you for using this program written by XXX.
         
    Remember that you need to demonstrate to TA in person, so make sure you understand every bit of your program.