i'm trying to study for an up comming test and i'm getting stumped on a few review questions..
"Determine the values of a loop counter and other values during the running of a program."
Code:
int x,y=0, value=24;
for( x=0, y=x+5;y<30;x++,y+=5)
{
value =value/y;
}
value of x | value of y | value of value |
__________________________________________________ ___________
_____________|_____________________|______________ ___________|
_____________|_____________________|______________ ___________|
_____________|_____________________|______________ ___________|
what i see happening is x and y goes up by5 and every time value is dived by the growing y value un till y is just under under 30? so in 5 or 6 cycles? iam not to sure anymore