1. (2+2+2+2+2) Write the following self-explanatory functions. Test them using a main function that calls them. double inchesToCentimeters(double inches); 1 inch = 2.54 cm double centimetersToInches(double centimeters); double areaOfTriangle(double base, double height); a=(1/2)bh int min(int x1, int x2); int min(int x1, int x2, int x3); 2. (10) Write a function that tests if an integer x divides into another integer y. Using that function, write a program that prints out all the factors of an inputted positive integer. The factors of an integer, are all the integers that divide that integer. > Input an integer: 24 > Factors are: 1 2 3 4 6 8 12 24 your function should look like bool isFactor(x, y) { ... } 3. (10) Write a function that tests if an integer is prime. An integer is prime iff its only factors are 1 and itself. 1 is not a prime by definition. Using that function, write a program that prints out the prime numbers between 2 and n, where n is an inputted integer. > What is the max num you want to check for primality? 30 > The primes between 2 and 30 are: 2,3,5,7,11,13,17,19,23,29 HINT: You can use a lot of the previous problem to do this one. 4. (5) Write a function that calculates the gcd of two integers. Make the function recursive. Do not use loops. Write a main function that utilizes the gcd function to calculate the gcd of inputted integers.