Week 5: Monday -------------- Q1. (60) A positive integer is called a left truncatable prime if the number itself and all numbers obtained by successively removing its left most digits are prime. For example, 173 is a left truncatable prime as 173 is a prime, 73 is a prime and 3 is a prime. 239is not a left truncatable prime as 39 is not a prime. Write a program that takes a positive integer n as input and then prints all the numbers less than n that are left truncatable primes. Your program should have at least three functions (other than the main): 1. 'isprime' defined as: int isprime(int n) that returns 1 if n is prime and 0 otherwise. 2. 'truncate' defined as: int truncate(int n) that returns the left truncated number of n. 3. 'left_truncatable' defined as: int left_truncatable(int n) that returns 1 if n is left truncatable and 0 otherwise. Q2. (40) An inversion in an array a of numbers is any pair (i,j) such that i < j and a[i] > a[j]. For example, consider the array {45,23,57,2}. The inversion pairs are (0,1), (0,3), (1,3) and (2,3). Write a program that given an array of positive integers, prints the inversions pairs and the number of inversions in it. Assume that the maximum size of the array is 10. Numbers are input till a non-positive integer is input or the array gets filled up. Your program should implement the function 'inversion_pair' that takes as argument an array and its size, prints the inversion pairs in the array returns the number of inversion pairs.