Sdt chapter3

a do-while takes away the need for initialization here