how do we use the nested for and while loop statements in creating programs?