Which of the following would be a base 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
a. If n = 0 then summation(n) = 0
You might also like to view...
Answer the following statements true (T) or false (F)
1. A program variable is the name of a storage location in the computer's internal memory. 2. Numeric variables in JavaScript can be either integers or floating point numbers. 3. JavaScript is a strongly typed language. 4. When a user enters a number at a prompt, it is stored initially as text. 5. The following statement would be considered true in JavaScript: "JACK" > "jack".
Answer the following statement(s) true (T) or false (F)
RG-59 is more expensive than RG-6, but has better resistance to attenuation.