Why doesn't my program function correctly?

Printable View