Consider the following recursive function for n greaterthano


Consider the following recursive function for n greaterthanorequalto 1. Algorithm 1 int recurseFunction (int n) If n == 0, return 1 If n == 1, return 1 i = 0 while i

Solution

#include<stdio.h>

#include<conio.h>

int recursiveFun(int);

int main()

{

int n;

printf(\"Enter n value:\");

scanf(\"%d\",&n);

int a=recursiveFun(n/9);

int b=recursiveFun(n/9);

int c=recursiveFun(n/9);

printf(\"%d\",(a+b+c));

return 0;

}

int recursiveFun(int n)

{

if(n==0 || n==1)

return 1;

int i=0;

while(i<n)

{

j=0;

printf(\"Hi\");

j=j+1;

}

i++;

}

}

 Consider the following recursive function for n greaterthanorequalto 1. Algorithm 1 int recurseFunction (int n) If n == 0, return 1 If n == 1, return 1 i = 0 w

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site