Problem Statement
A prime number is a number, which can be divided evenly only by 1 or
itself, and it must be greater than 1.
For example, 7 can be divided evenly only by 1 or 7, and 7 is greater than
1, so it is a prime number.
Let us call a prime number is hard if its sum of digits (in decimal
convention) is also prime. For example, 23 is a hard prime, but 13 is not.
Write a full program implementing the following functions:
(i)
checkPrime: It takes a number as a parameter and returns 1 if it is
a prime number, else it returns 0.
(ii)
addDigit: which takes a number as parameter and returns its sum
of digit.
(iii) A main function which reads a number N, and prints all the hard
primes and their number (counting them) till N.