3. Write a recursive algorithm of the sequence t(1)=1 and t(n)=n2 t(n-1) as a function.
1 answer:
Answer:
int t(int n){
if(n == 1)
return 1;
else
return n*n*t(n-1);
}
Step-by-step explanation:
A recursive function is a function that calls itself.
I am going to give you an example of this algorithm in the C language of programming.
int t(int n){
if(n == 1)
return 1;
else
return n*n*t(n-1);
}
The function is named t. In the else clause, the function calls itself, so it is recursive.
You might be interested in
Answer:
2(x+6)
Step-by-step explanation
Answer: 685 red marbles
Step-by-step explanation:
Lets set up a proportion:
x/1096 = 5/8
(For every 8 marbles, 5 of them are red)
Then we cross multiply
5480 = 8x
and divide!
so 685 marbles
You cant simplify seven tenths
Answer:
Dana needs 72 feet of ribbon to make all the bows
Step-by-step explanation:
If she needs to make all the bows, she needs a total of:
18 times 4 feet = 18 * 4 = 72 feet of ribbon
Where are the inequalities?