The values are fine, you just have no spacing so it looks incorrect. Try putting a '\n' after you output z and check the results again.
The output might be a bit clearer and make sense if you put an << endl; at the end of line 8
Makes sense to me :-)
:p Yes, you are right!Thanks