Using Microsoft Visual Basics NET ONLY This assignment encom
Using Microsoft Visual Basics (.NET) ONLY!
(This assignment encompasses Do-Loop concepts from Chapter 5. The next assignment will cover For-Next loops and Strings from Chapter 5.)
10. Input Box
What is the purpose of an input box? (1 point)
What is the variable type of the return value of an input box? (1 point)
11. Using a Do...Loop While structure, write the code that repeatedly prompts the user using an InputBox for a number, and continues to prompt the user until a valid positive number is entered. (8 points)
12. Determine if each of the following is true or false. (1 point each, 4 total)
Question
True or False
Each execution of a loop is called an iteration.
A Do...Loop body that evaluates the condition after executing the loop may never execute.
Accumulator variables can only be Integer variables.
Sentinel values must always be the value -1 to stop execution.
| Question | True or False |
| Each execution of a loop is called an iteration. | |
| A Do...Loop body that evaluates the condition after executing the loop may never execute. | |
| Accumulator variables can only be Integer variables. | |
| Sentinel values must always be the value -1 to stop execution. |
Solution
12) a) Each execution of a loop is called an iteration : True yes everytime a loop executes we says loop iterated i.e. one iteration finished.
b) False, the do loop is different from other loop in sense it will executes atleast once.
