(Solved) : 60 141 Lab Exercises 1 Due End Lab Period July 4th July 9th 2018 Objectives Working Iterat Q30178031 . . .
(60-141) Lab Exercises #1 (Due at the end of the lab period July 4th or July 9th, 2018) Objectives: Working with iterative and recursive functions Pre-requisite(s): Read and review chapters 1-5 Code and document the following functions using ITERATIVE and RECURSIVE functions (two implementations for each function: iteratively and recursively) Test the functions by calling them from a simple interactive main0 function using a menu, with different values used to select the choice of function. Overall, you should have one C program (call it firstnameLastname Lab1.c) containing one main) function and 10 other functions, where the functions are called based on the user input to the menu choices. The program should contain a loop that permits users to enter a new choice of function for each loop, until exit from the loop explicitly Factorial(0) 1; 1 Factorial(n)n*(n-1)*. . . ‘2*1 Requirement: n0; reject with error message otherwise Fibonacci(0) 0; Fibonacci(1)1; Fibonacci(n)Fibonacci(n-1)+Fibonacci(n-2): Requirement n0; reject with error message otherwise gcd (x, y,-x, if y:0 3gcd (x, y)-gd (y, x MOD y). ify >0 Requirement:x and y both 0; reject with error message otherwise 4 Power(a.b)- ab Requirement: a> 0, b0, b is an integer, reject with error message otherwise digProduct (x) = rightDigit digProduct ( x/10) Requirement: x is an unsigned integer(> 0); reject with error message otherwise Show transcribed image text
Expert Answer
Answer to 60 141 Lab Exercises 1 Due End Lab Period July 4th July 9th 2018 Objectives Working Iterat Q30178031 . . .
OR