I have a question in a exam and by the way that it sounds, it should be a trap:
How many assignments will there be executed in the following algorithm if
nandpare considered to be integers?
p=1; n=279;
while (n>=100)
{ p=p*10;
n=n-100;
}
I would say that there are 4 assignments in the while loop and two before the while ... so 6 ? I'm not sure why the question highlights the integer feature of the variables.