Which of the following would be a recursive case for a summation algorithm (the sum of the numbers from 0 to n)?

a. If n = 0 then summation(n) = 0
b. if n > 0 then summation(n) = 5
c. If n > 0 then summation(n) = getValue(n)
d. If n > 0 then summation(n) = n + summation(n-1)
e. None of these


d. If n > 0 then summation(n) = n + summation(n-1)

Computer Science & Information Technology

You might also like to view...

Answer the following statements true (T) or false (F)

1) A Unicode code value is represented as U+yyyy, where yyyy represents a number in binary notation. 2) A diacritic is a character with a special mark that emphasizes an accent. 3) Unicode is portable. 4) When designing Python documents, the entity reference is denoted by #U+yyyy.

Computer Science & Information Technology

What do the first 24 bits of a MAC address represent??

A. ?Organizationally Unique Identifier B. device ID C. ?extension ID D. ?network ID

Computer Science & Information Technology