Hello,
I need to be able to know the output of this loop without a computer... I came up with i=20 s=60, but the answer is i=20 s=3 and I dont understand the logic behind it. Can someone please explain?
Code:int main() {
int i=0, s=0;
while ( i<20)
i++;
s= s+3;
printf("i=%d, s=%d\n", i, s);
Thanks in advance