0

Write a program to take input from user and tell whether it is prime palindromic or not?

prime palindrome is a number which is a prime number and the number is also palindrome . example-151 ( prime also and palindrome)

5th Feb 2017, 1:30 PM
Divyanshu Kumar
Divyanshu Kumar - avatar
1 Answer
0
After inputing the number use this snippet k=n while(n>0){ d= n%10; n= n/10; r= r*10+d; } if (r==k){ \\It is a palindrome number for(i=1;i<=k;i++){ if (k%i==0) a=1; } if (a== 1) \\ The number is a prime palindrome number
6th Feb 2017, 2:18 PM
Bhaskar M R
Bhaskar M R - avatar