Computer Science, asked by snehal1525, 4 months ago

Design a class PS that has two static methods palindromeOrNot) and series().

palindromeOrNot() method accepts a number from user
and checks whether it is a palindrome number.

series() method should print the series having terms as
4N+1 (print first 5 terms).
​​

Answers

Answered by rashmisethi337
0

Answer:

Palindrome Program in Java

Palindrome number in java: A palindrome number is a number that is same after reverse. For example 545, 151, 34543, 343, 171, 48984 are the palindrome numbers. It can also be a string like LOL, MADAM etc.

Palindrome number algorithm

Get the number to check for palindrome

Hold the number in temporary variable

Reverse the number

Compare the temporary number with reversed number

If both numbers are same, print "palindrome number"

Else print "not palindrome number"

Similar questions