Problem:
Question 1: Write the definition for an int-valued function called factorial that takes one int parameter and returns the factorial of the number, or -1 if the parameter is negative. Recall that the factorial of a number n, written as n!, is the product of all the integers from I upton. For example, 4! =I *2*3*4. The factorial ofO is defined as I.
Question 2: Why is it important to know the length of strings in your program?
Show the code, demonstrate it works properly and describe what it is doing.