Math, asked by jyotirajput196, 8 months ago

30 Design a class PrimePalinen to generate prime palindrome numbers.
A numb is said to le prime palindrome if the number is a prime as well as a
palindrome number
Prime number: A number having only two factors le 1 and itself
Palindrome number: A number which is same as its reversel
Pxample: 1 (where 11 is a prime number and a palindrome number)
Some of the members of the class are given bwlow:
Clans name
Primelalingen
Data member instance variables
to store the start of rancs
to store the end of range
Methods/Member functions:
PrimePalinten (inta, int b): parameterized constructor to initialize the
data members start and end - b
int Prement)
nturns if the number is prime otherwise
retums 0.
int I Palin(int i)
returns if the number is a palindrome otherwise
returns 0.
void generate()
generates all prime palindrome numbers between
start and end by invoking the functions isPrime()
and is Palin
Specify the claws PrimePalinGen giving details of the constructor(), int isPrime(int),
int isPalin(int) and void generate() Define a main() function to create an object and
call the functions accordingly to enable the task
1101​

Answers

Answered by satishbatchu70
0

Answer:

Given a number n, print all palindromic primes smaller than or ... And if n is 20, the output should be “2, 3, 5, 7, 11′. ... Print all palindromic prime numbers.

Answered by mk9451420682
0

your answer will be reported

Similar questions