Why does the loop in my program turn infinite?

Printable View