asked 85.6k views
5 votes
Given the recursive function:
f(1) = 0
f(n) = 2 + f(n - 1)
What is f(3)?

1 Answer

2 votes

Answer:

f(3) = 4

Explanation:

using the recursive function f(n) = 2 + f(n - 1) with f(1) = 0 , then

f(1) = 0

f(2) = 2 + f(2 - 1) = 2 + f(1) = 2 + 0 = 2

f(3) = 2 + f(3 - 1) = 2 + f(2) = 2 + 2 = 4

answered
User Hazzelnuttie
by
8.2k points

No related questions found

Welcome to Qamnty — a place to ask, share, and grow together. Join our community and get real answers from real people.