Question: c + + The Triangle Sum Challenge. T n , the n t h triangle number, is the number of points required to construct a

c++
The Triangle Sum Challenge.
Tn, the nth triangle number, is the number of points required to construct a
triangle with n dots on each side (see Figure 1). In particular, the sum of integers
from 1 to n is as follows.
Tn=i=1ni
Write a recursive function int triangleNum(int n) that returns Tn.
-08
T1-1,T2-3,T4-6,T4-10
Figure 1: The Triangle Challenge
 c++ The Triangle Sum Challenge. Tn, the nth triangle number, is

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!