Calling an algorithm
The algorithm AlgA in Listing 2 receives two numbers, labeled n1 and n2, and calls another algorithm, AlgB in Listing 1, to calculate a value based on the input.
AlgB receiving a number labeled n as input.
AlgA receiving two numbers labeled n1 and n2 as input and calling AlgB.
Given the inputs n1 = 2 and n2 = 3, what is the output of AlgA? Select the correct output from the following options:
- 5
- 6
- 13
- 23