Implementation of "While" loop

Implemented the while loop, tested on Windows and Linux.