Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Case Studies In Business Data Bases

Authors: James Bradley

1st Edition

0030141346, 978-0030141348

More Books

Students also viewed these Databases questions