Please write both function PROTOTYPE and DEFINITION for the function. IN C PLEASE :P
/*
Line1: Describe the function/its purpose briefly
Line2: Describe the input parameters, or the assumptions/requirements going into the function
Line3: Describe the output of the function. (what does it return? what does it print?)
*/
3. Fibonacci(n) = Fibonacci(n-1) + Fibonacci(n-2);
Where n is a positive integer n >= 0 and
Fibonacci(1) = 1;
Fibonacci(0) = 0;
// PROTOTYPE
long fibonacci(int);
// DEFINITION
/*
* This function calculates the fibonacci of a given number
* Input parameter n should be non-negative
* This function returns the fibonacci of given number
*/
long fibonacci(int n) {
if(n == 0) {
return 0;
} else if(n == 1) {
return 1;
} else {
return fibonacci(n-1) + fibonacci(n-2);
}
}
Please write both function PROTOTYPE and DEFINITION for the function. IN C PLEASE :P /* Line1:...