: // Demonstrates a while true loop
3:
4: #include <iostream.h>
5:
6: int main()
7: {
8: int counter = 0;
9:
10: while (1)
11: {
12: counter ++;
13: if (counter > 10)
14: break;
15: }
16: cout << "Counter: " << counter << "\n";
17: return 0;
18:
Output: Counter: 11