Write a JAVA program to enter a number and check as a palindrome as well as a prime number.
Home
/
Computer Science
/
Write a JAVA program to enter a number and check as a palindrome as well as a prime number
Write a JAVA program to enter a number and check as a palindrome as well as a prime number.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Palindromic Prime Number in JAVA
Get the number to check for PalPrime Number.
Hold the number in temporary variable.
Using loop find if it is prime or not.
Check if the number is Palindrome or not.
If the number is both prime and
palindrome print "PalPrime Number"
If not print "Not a PalPrime Number
Explanation:
Palindromic Prime Number in JAVA
Get the number to check for PalPrime Number.
Hold the number in temporary variable.
Using loop find if it is prime or not.
Check if the number is Palindrome or not.
If the number is both prime and palindrome print "PalPrime Number"
If not print "Not a PalPrime Number"