Function to check if the numbers formed by combining first and last digits generates a prime number or not
bool isAnyPrime ( int first , int last ) { int num1 = first * 10 + last ; int num2 = last * 10 + first ;