What does this program segment do?

```
s = 0;
i = 1;
do
{
s += i;
i++;
} while (i < n);
```
a. Adds all the integers from 1 to n.
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.

b. Adds all the integers from 1 to n-1.

Computer Science & Information Technology

You might also like to view...

When creating a formula for a calculated field and fields are added to this box, they do not retain their descriptive names:

A) Formula. B) Formula Input. C) Captions. D) Properties.

Computer Science & Information Technology

________ can be created by putting a pound sign (#) in front of a key phrase

A) Retweets B) Twitterers C) Hashtags D) Tweeters

Computer Science & Information Technology