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

Other questions on the subject: Engineering

image
Engineering, 04.07.2019 18:10, ahmedeldyame
Aloaded platform of total mass 500 kg is supported by a dashpot and by a set of springs of effective stiffness 72 kn/m. it is observed that when the platform is depressed through a distance x = 12.5 cm below its equilibrium position and then released without any initial velocity; it reaches its equilibrium position in the shortest possible time without overshoot. find the position and velocity of the loaded platform 0.10 sec. after its release. if a further load of 400 kg is added to the platform, find, i) the frequency of damped vibrations, and i) the amplitude of vibration after 2 complete oscillations, given that the initial amplitude is 15 cm.
Answers: 1
image
Engineering, 04.07.2019 18:10, michellerosas
Ajournal bearing has a journal diameter of 3.250 in with a unilateral tolerance of 20.003 in. the bushing bore has a diameter of 3.256 in and a unilateral tolerance of 0.004 in. the bushing is 2.8 in long and supports a 700-lbf load. the journal speed is 900 rev/min. find the minimum oil film thickness and the maximum film pressure for both sae 20 and sae 20w-30 lubricants, for the tightest assembly if the operating film temperature is 160°f. a computer code is appropriate for solving this problem.
Answers: 3
image
Engineering, 04.07.2019 18:10, genyjoannerubiera
Assuming compressible flow of air and that the measurements are done at flagstaff a pitot static tube that gives the difference of total and static pressure measures 0.35 m of mercury. what is the velocity of air? assume the temperature to be 300k. (submit your excel or matlab calculation sheet)
Answers: 1
image
Engineering, 04.07.2019 18:10, samanthabutryn
Which one from below is not one of the reasons of planning failures? (clo3) a)-planner is careless. b-planner spend less time in the field but more time on the desk c)-planner is not qualified d)-planner does not have sufficient time to properly plan
Answers: 3
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 in other subjects:

Konu
Mathematics, 09.07.2019 13:00
Konu
History, 09.07.2019 13:00
Konu
Computers and Technology, 09.07.2019 13:00
Konu
Mathematics, 09.07.2019 13:00