Question: USE C programming (test it before upload it) Q2) Consider the function f(n) = 5f(n1)6f(n2), n 2, f(0) = 0, f(1) = 1. Write a
USE C programming (test it before upload it)
Q2) Consider the function f(n) = 5f(n1)6f(n2), n 2, f(0) = 0, f(1) = 1. Write a program that calculates f(n) recursively.
At the start of the program, prompt the user to input an integer number by printing "Input an integer: ". If the input is negative, then print "Input must be nonnegative. ". If the input is nonnegative, then print the value of f(n) as "f(
You should use the following function prototype:
int recursiveFunc(int n);
Example input/output pairs (without the prompt) are provided below.
(a) Input: 0; Output: f(0) = 0 (b) Input: 1; Output: f(1) = 1
(c) Input: 3; Output: f(3) = 19
(d) Input: 4; Output: f(4) = 65 Note: Include all of your code in one file named recursion.c.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
