how to get this set of code right (while, if, else)

Printable View