created while loop

created while loop and write them to the console