Question: 1 2 . The triangular numbers are as follows: 1 = 1 3 = 1 + 2 6 = 1 + 2 + 3 1
The triangular numbers are as follows:
etc.
The series begins with the first triangular number To calculate the nth triangular
number, n is added to the previous triangular number. For example, the fourth triangular
number is calculated by adding to the third triangular number which is ie
Write a recursive function pseudocode in that will calculate the nth triangular number.
Note: will not receive any credit for a nonrecursive solution.
For example, the following statements would lead to the underlined output:
Example :
print triNum;
Example :
print triNum;
Example :
print triNum;
Note: you may assume the parameter will be positive no error checking of inputs is
required
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
