Created a while and do while loop