- 4.1 Introduction
- 4.2 Algorithms
- 4.3 Pseudocode
- 4.4 Control Structures
- 4.5 If...Then Selection Statement
- 4.6 If...Then...Else Selection Statement
- 4.7 Nested If...Then...Else Statements
- 4.8 Repetition Statements
- 4.9 Compound Assignment Operators
- 4.10 Formulating Algorithms: Counter-Controlled Repetition
- 4.11 Formulating Algorithms: Nested Control Statements
- 4.12 Using the Debugger: Locating a Logic Error
- 4.13 Wrap-Up
- Summary
- Terminology
- Self-Review Exercises
- Answers to Self-Review Exercises
- Quick Quiz
- Exercises
- Making a Difference Exercises
Self-Review Exercises
4.1 |
Answer each of the following questions.
|
4.2 | State whether each of the following is true or false. If false, explain why.
|
4.3 | Write two different Visual Basic statements that each add 1 to Integer variable number. |
4.4 | Write a statement or a set of statements to accomplish each of the following:
|
4.5 | Write a Visual Basic statement to accomplish each of the following tasks:
|
4.6 | Combine the statements that you wrote in Exercise 4.5 into a program that calculates and displays the sum of the Integers from 1 to 10. Use a Do While...Loop statement to loop through the calculation and increment statements. The loop should terminate when the value of control variable number becomes 11. |
4.7 | Identify and correct the error(s) in each of the following (you may need to add code):
|
4.8 | State whether each of the following is true or false. If the answer is false, explain why.
|