Question: Program 2: Palindrome Number ID: ID002 Make sure you include this ID as a System.out.println() message at the beginning of your program. This helps us

Program 2: Palindrome Number

ID: ID002

Make sure you include this ID as a System.out.println() message at the beginning of your program. This helps us with grading, and is required.

Before beginning this project, make sure to completely read through the instructions, and then draw the flowchart. The flowcharts will be taken up at the beginning of our next Lab.

Write a program that prompts the user to enter a three-digit integer and determines whether it is a palindrome number. A number is a palindrome if it reads the same from right to left, and from left to right. For example, 373 is a palindrome number, but 519 is not.

The pseudocode is provided to you below:

This program will determine whether a number is a palindrome

num <- user input

firstDigit <- num / 100

num <- num % 10

(num now represents the last digit)

if firstDigit equals num, then

display This was a palindrome

else

display This was not a palindrome

Below is the input and the output we expect from your program. This is to help you know if you are on the right track.

Example input :

373

Example output:

ID002

Enter a palindrome: [integer]

This was a palindrome

Example input :

578

Example output:

ID002

Enter a palindrome: [integer]

This was not a palindrome

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!