Which of the following will sum up all the integers between 1 and 10, inclusive?

a.
```
var sum = 0;
for (var i = 1; i < 11; i ++)
sum = sum + i;
```

b.
```
var sum = 1; var i = 1;
while(i < 11)
sum = sum + i;
```

c.
```
var sum = 1; var i = 1;
while(i != 10)
{
i++;
sum = sum + i;
}
```

d.
```
var sum = 0;
for (var i = 1; i < 10; i++)
sum = sum + i;
```

a.
```
var sum = 0;
for (var i = 1; i < 11; i ++)
sum = sum + i;
```

Computer Science & Information Technology

You might also like to view...

You can create a link on any text on a web page.

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

Computer Science & Information Technology

Of the three, PAP, CHAP, and MS-CHAP, ____________________ offers the most security for dial-up authentication.

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology