add switch and while loop statement examples