write a program to create 2 function int reverse(int n) and int face print whether a number is twisted prime(empirp number) or not the number is prime where as its reverse is also prime
Answers
Answered by
0
Answer:
STEP 1: START
STEP 2: DEFINE n, reverse, flag
STEP 3: SET sum = 0
STEP 4: ENTER n
STEP 5: REPEAT STEP 6 to 8 UNTIL (n!=0)
STEP 6: reverse = n%10
STEP 7: sum = sum*10 + reverse
STEP 8: n = n/10
STEP 9: SET flag =0
STEP 10: REPEAT STEP 11 UNTIL j<=sum/2
STEP 11: if(sum%j)==0
then
set flag = 1
break
STEP 12: if(flag==0)
then PRINT "yes"
else
PRINT "no"
STEP 13: END
Similar questions