How to make the n-th number of cycles in a while loop C++.?

Good afternoon. I'm new to C++ and I am interested in the while loop, you set n-th number of cycles. For example, I wish that word was entered for the number of times specified by the user ( cin ). I apologize if I incorrectly expressed.
April 4th 20 at 00:52
1 answer
April 4th 20 at 00:54
Solution
int
counter = 0, // counter
maxCount; // maximum value of the counter (ask the user)

cin >> maxCount; // asked

// chase cycle from 0 to maxCount-1
while (counter < maxCount)
{
cout << " Boo " << counter; // do something
counter++; // increment counter
}

Find more questions by tags C++