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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.