using while to solve this question !

Printable View