control structure exercise solution