4. Introduction to Problem Solving and Control Statements

Let’s all move one place on.

—Lewis Carroll

The wheel is come full circle.

—William Shakespeare

How many apples fell on Newton’s head before he took the hint?

—Robert Frost

Objectives

In this chapter you’ll learn:

• Basic problem-solving techniques.

• To develop algorithms through the process of top-down, stepwise refinement.

• To use the If...Then and If...Then...Else selection statements to choose among alternative actions.

• To use the Do While...Loop, While...End While and Do Until...Loop repetition statements to execute statements in an app repeatedly.

• To use the compound assignment operators to abbreviate assignment operations.

• To use counter-controlled repetition.

• To use ...

Get Visual Basic® 2012 How to Program, Sixth Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.