4. You are given the following functions: int functionA(int a) { printf ("a-sd\n", a); if (a==1) return 1; else return functionB (a-1) *2; int functionB (int b) { printf ("b=3d\n",b); if (b--1) return...


4. You are given the following functions:<br>int functionA(int a) {<br>printf (

Extracted text: 4. You are given the following functions: int functionA(int a) { printf ("a-sd\n", a); if (a==1) return 1; else return functionB (a-1) *2; int functionB (int b) { printf ("b=3d\n",b); if (b--1) return 1; else return functionA (b-1) *3; Write the main function. Your main function should prompt the user for input and then call the mutual recursion by passing in the user's input. The guidelines are described below. int main () { //declare int a to receive user input and int result to receive result of mutual recursion //using a while loop, prompt user for input. The number entered //must be bigger than 1, otherwise repeat user input with an error //message. //call functionA () with int a as input argument. Receive the result in int result. //print result return 0;

Jun 06, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here