Can anyone tell me if I'm dong this correctly.

S(10) = 1; S(n) = n + S(n + 1) for 0 < n < 10

I'm looking for the value of S(7)

S(10) = 1
S(9) = 9 + S(9 + 1) = 10
S(8) = 8 + S(8 + 1) = 18
S(7) = 7 + S(7 + 1) = 25

S(7) = 25

Recommended Answers

All 2 Replies

Yeah, that's correct.

Thank you!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.