Can some one help me understand the logic of this beginner's program

Printable View