Working while loop added.
Working for loop implemented