In case of 14: The reason is first time you enter in the for loop, x's value is 14. So, in while loop, 14%2==0 and it enters and sets the value of x to 7 by your statement x/=i;
And you know 7 has...