print and while statement