Question
For this problem, you need to adapt your prime number program that you wrote in homework 2 to check for palindromic primes. Palindromic primes are
For this problem, you need to adapt your prime number program that you wrote in homework 2 to check for palindromic primes. Palindromic primes are defined as prime numbers that are the same if read forwards or backwards. For example, 757 is a palindromic prime, but 59 is not. You need to print all the palindromic primes below a certain upper limit.
Specifications
This program is worth 60 points, and is calledPalPrimes.java
.Create a class with the appropriate name. Then create a method called isPalin()which accepts an integer and returns true or false based on if number is palindrome or not.(25points)
Accept the upper limit from the user.(10points)
In the main() method, generate a prime number and then check if it is a palindrome or not by calling the isPalin()method. If it is, print it. If not, move on to the next number.(25 points)
Please enter the upper limit:250
The palindrome primes are: 2 3 5 7 11 101 131 151 181 191
Need program that gives me that output
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started