Question: QUESTION 7 A(n) ____________loop is a loop that has no provisions for termination. QUESTION 8 The first value printed with the program segment below is

QUESTION 7

A(n) ____________loop is a loop that has no provisions for termination.

QUESTION 8

The first value printed with the program segment below is ____. int counter = 0; while (counter < 100) { WriteLine(counter); counter++; }

0

1

99

100

none of the above

QUESTION 9

If aValue, i, and n are type int variables, what does the following program fragment do? aValue = 0; n = 10; for (i = n; i > 0; i--) if (i % 2 == 0) aValue = aValue + i;

computes the sum of the integers from 1 through n

computes the sum of the integers from 1 through n ?1

computes the sum of the even integers from 1 through n

computes the sum of the odd integers from 1 through n

none of the above

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!