Source code for our zigzag program.