Solution for While loops

A possible solution for the while loop exercise