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) = get Value(n)
d. If n > 0 then summation(n) = n + summation(n-1)
e. None of these


a. If n = 0 then summation(n) = 0

Computer Science & Information Technology

You might also like to view...

If a PC on an Ethernet network attempts to communicate with a host on a different subnet, what destination IP address and destination MAC address will be placed in the packet/frame header sent by the PC?

a. Dest. IP: IP address of default gateway. Dest. MAC: MAC address of default gateway. b. Dest. IP: IP address of remote host. Dest. MAC: MAC address of default gateway. c. Dest. IP: IP address of remote host. Dest. MAC: MAC address of remote host. d. Dest. IP: IP address of remote host. Dest. MAC: MAC address of local PC.

Computer Science & Information Technology

Pseudocode is a high-level language used to develop programs.

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

Computer Science & Information Technology