Week 5: Friday -------------- Q1. (40) Write a program that takes two real numbers as input from the user and an operator from the set {+,-,*,/,^}. The operator is input as a character. Print an error if the operator is outside the set of 5 characters. The ^ operator implements the power function, i.e., x^y = x raised to the power of y. The main program then should call a function cal with three parameters (the two numbers and the operator) which would check which operation to perform and then return the corresponding value. Example: If input is 5 8 - then output is -3 Q2. (60) Define a function sqn for all positive integers that returns the sum of squares of digits of n in decimal representation. It is a mathematical fact that starting from any arbitary positive integer n, if we keep on applying sqn, we shall eventually get either 1 or 89. For example sqn(17) = 50, sqn(50) = 25, sqn(25) = 29, sqn(29) = 85, sqn(85) = 89 sqn(100) = 1 For each positive integer n, the smallest number of times we need to apply the function sqn till we get 1 or 89 is called the depth of the function. So, in the above cases depth for n = 17 is 5 and depth for n = 100 is 1. Write a main program that takes as input a positive integer n from the user and then prints the depth of sqn(n). Your program should have a main function and a sqn function.