home
clear breadcrumbs
search
login
 
infinite loop
#include
using namespace std; void main() { int i{2}; for (;;) cout << i++ << endl; } #include
using namespace std; void main() { char answer{}; while (true) { cout << "Do you want to contnue? Y/N" << endl; cin >> answer; if (toupper(answer) == 'Y') { break; } } }