Chapter 8. Solving Problems a Piece at a Time

A good way to solve complicated problems is to break them up into very small problems and solve each individual problem. A program is a collection of code that solves one or many related problems, depending on the scope of the problem. In earlier hours, you saw many examples referring to lines of code as statements. A statement can be one or more lines of code, much as a sentence can be simple (such as “Hello, Bob!”) or more complicated (such as the sentence you are reading now). In programming, examples of statements include A = 5 and Dim A As Integer. Statements are the building blocks of functions and subroutines.

This hour teaches you how to find recurring and useful lines of code that can be placed ...

Get Sams Teach Yourself Microsoft 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.