Tracing table question

Hello there. I am completely lost at what this question is asking. I appreciate any help

hand trace the following & show the value of n & the output

int n = 5;
while (n >= 0)
{
n--;
cout << n;
}
you should go step by step and get the output and the value of n

1. n = 5
2. n >= 0 is true -> loop
3. n-- -> n=4
4. cout << n -> output: 4
.
.
.
.
.
.
Last edited on
Topic archived. No new replies allowed.