What does this program segment do?

```
s = 0; i = n; do
{
s += i;
i--;
} while (i != 0);
```
* a. Adds all the integers from n down to 1.
b. Adds all the integers from 1 to n-1.
c. Adds the even integers from 1 to n.
d. Adds the odd integers from 1 to n.
e. None of the above.

c. Adds the even integers from 1 to n.

Computer Science & Information Technology

You might also like to view...

Access begins counting days of the week on Monday

Indicate whether the statement is true or false

Computer Science & Information Technology

A shared workbook cannot be merged using the Compare and Merge Workbooks tool

Indicate whether the statement is true or false

Computer Science & Information Technology