Chapter 6 Quiz 1 (VB)

Pataasin ang iyong marka sa homework at exams ngayon gamit ang Quizwiz!

Do Until Loop -

Posttest loop

Which of the following statements are true? [Check all that apply]

The Do While loop is known as a pretest loop because it will test the condition before each iteration. The statements in a Do Until loop must execute at least one time.

Which of the following is a control structure that causes a statement or a group of statements to repeat?

a loop

Visual Basic contains which of the following loop control structures?

all of these the Do Until loop the Do While loop the For loop

For count As Integer = 1 To 5 lstOutput.Items.Add(count) Next

count - counter variable 1 - initial value 5 - terminating value The Next statement increments the value of count.

num = CDbl(InputBox(prompt)) Do While num >= 0 count += 1 sum += num num = CDbl(InputBox(prompt))

count is a counter variable sum is an accumulator variable -1 is called a sentinel value

Each repetition of a loop is known as a(n)

iteration

variable - after do while

loop control variable

Do While Loop -

pretest loop- the condition is tested beforeeach iteration.

In the following Do While loop, the variable number is referred to as what? Do While number < 5 sum = sum + number number = number + 1 Next

the pretest


Kaugnay na mga set ng pag-aaral

Science Bowl Cornucopia!!!!, Science Bowl sample questions, Science Bowl Practice: Round 2

View Set

Chapter 2 - The Accounting Equation

View Set

mastering bio circulatory and respiratory

View Set

SYBEX Book - AWS Cloud Practitioner End of Chapter Questions

View Set

Acct. Ch 19, accounting managerial midterm, Review Sheet 101-152

View Set

Chapter 5: Product Differentiation

View Set

Chapter 40: Management of Patients with Gastric and Duodenal Disorders

View Set

Ch 7 Legal Dimensions of Nursing Practice

View Set

Chapter 10: Divorce, Remarriage, and Blended Families

View Set