Counting how many times a loop executes

I'm having a hard time figuring out how many times a loop executes and what the output is given a code.
Here's an example:

count = 1;
while (count <= 12)
{
cout << count << endl;
count++;
}


If someone could explain how I look for the answers in something like this I'd appreciate it. My homework asks a few of these questions.
start counting from 1 untill you reach 12 and see the figure. This is the amount of times this loop will run.

infact you have a cout in your loop.. so if you apply a little mind you will see the number of times there is a print is equal to the number of iterations.
Topic archived. No new replies allowed.