subject
Engineering, 14.04.2021 14:00 piratesfc02

A number (or a word) is called palindrome if it may be read in the same way from left to right as right to left (e. g. 131 and 56965). Write a Java application that reads from the user a positive integer consists of exactly 5 digits. Then separates the integer into its individual digits and prints a message indicating if this integer is palindrome or not. The program should print an error message if the number is not positive and not composed of 5 digits. Hint: Use % 10 in order to extract the last digit of an integer and / 10 in order to eliminate the last digit of an integer. For example, 942 % 10 = 2 and 942 / 10 =94. Sample run1: Enter a positive integer (5 digits): -12345 The number should be positive and of 5 digits Sample run2: Enter a positive integer (5 digits): 123 The number should be positive and of 5 digits Sample run3: Enter a positive integer (5 digits): 12321 12321 is a palindrome Sample run4: Enter a positive integer (5 digits): 12345 12345 is not palindrome

ansver
Answers: 1

Another question on Engineering

question
Engineering, 04.07.2019 18:10
An air conditioning system consist of a 5 cm diameter pipe, operating at a pressure of 200 kpa. the air initially enters the pipe at 15°c with a velocity of 20 m/s and relative humidity of 80%. if the heat supply throughout the process is 960 w, determine the relative humidity and the temperature at the outlet
Answers: 3
question
Engineering, 04.07.2019 18:10
True or false (explain) (110)[111] is a slip system in bcc metals . the {111} family in fcc contains 8 planes. resolved shear stress (rss) in single crystals is just related to the applied stress. critical resolved shear stress (crss) in single crystal metals is direct proportional to the number of defects in the structure
Answers: 2
question
Engineering, 04.07.2019 18:10
What are the two (02) benefits, which may result from a successful implementation of preventive maintenance (pm) program in an organization? (clo3)a)- lean manufacturing b)-overlapping responsibilities c)-the planner is not qualified d)-accurate contractor information e)-reduction in equipment redundancies f)-accurate stores information
Answers: 3
question
Engineering, 04.07.2019 18:20
Describe one experiment in which the glass transition temperature and melting temperature of a totally amorphous thermoplastic material can be determined. show the relevant experimental results in a diagram which should be properly annotated with the two temperatures clearly marked. what is likely to happen to the curve in the diagram if the amorphous polymer is replaced by a thermosetting type?
Answers: 2
You know the right answer?
A number (or a word) is called palindrome if it may be read in the same way from left to right as ri...
Questions
question
Social Studies, 02.09.2020 21:01
question
Mathematics, 02.09.2020 21:01