Online Book Reader

Home Category

HTML, XHTML and CSS All-In-One for Dummies - Andy Harris [159]

By Root 1437 0
four, or more dimension arrays in programming, but don’t worry about that yet. (It may make your head explode.) Most of the time, one or two dimensions are all you need.

This program is a touch longer than some of the others, so I break it into parts in the following sections for easy digestion. Be sure to look at the program in its entirety on the CD-ROM.

Figure 4-7:

It’s a Tale of Two Cities. You even get the distance between them!

Setting up the arrays

The key to this program is the data organization. The first step is to set up two arrays.