0% found this document useful (1 vote)
137 views2 pages

Prime Palindrome Number

A prime number whose reverse is equal to the original number. Example 11, reverse of 11 is 11 and its a prime number so its a prime palindrome
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (1 vote)
137 views2 pages

Prime Palindrome Number

A prime number whose reverse is equal to the original number. Example 11, reverse of 11 is 11 and its a prime number so its a prime palindrome
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

PRIME PALINDROME NUMBER

import [Link].*;

class primerev

void pp(int mn)

int temp1,temp2;

int r1,rev = 0;

int i,j,k,l;

int count = 0;

temp1 = mn;

for(i = 2;i<=temp1;i++)

if(temp1%i==0)

count++;

else

count = 0;

if(count==1)

while(temp1>0)

r1 = temp1%10;
rev = rev*10+r1;

temp1 = temp1/10;

if(rev==mn)

[Link]("The number is PRIME PALINDROME");

else

[Link]("The number is prime palindrome");

else

[Link]("The number is not prime");

public static void main()

Scanner scn = new Scanner([Link]);

[Link]("Enter the number");

int fn = [Link]();

primerev rsh = new primerev();

[Link](fn);

You might also like