Implemented the do .. loop statements with conditions