
CIS 155 CIS155 Week 5 Quiz Answers
- (TCO 5) Failure to update the loop control variable within the loop body creates which of the following?
- (TCO 5) What (if anything) is wrong with the following loop?
Dim X As Integer = 1
While X > 10
Console.Writeline( X)
X = X + 2
End While - (TCO 5) Your program asks the user to enter a number between 50 and 100. What is the correct condition for the following validation loop?
Dim num As Integer
Console.Write(“Enter a number between 50 and 100: ”)
Num = Console.Readline()
While ________________________________
Console.Write( “Invalid, please reenter a number between 50 and 100: ”)
Num = Console.Readline()
End While - (TCOs 5, 8) Write a loop in pseudocode or Visual Basic to print the integers from 10 to 100 counting by 10s.
- (TCOs 5, 8) Write the pseudocode for the flowchart below, and list what the output will be if the input for num is 9.