In the for-loop, the index has a fixed increment in each iteration.
For example, in this loop, i will start from 1, 2, 3... 10.
for (i=1, i<=10, i++) {
do something....
}
Where as while loop, as you have indicated, x, y and z must all be 1 before the loop is executed.
Once inside the while...