While loop crashing my programme?

Printable View