| <<< | Index | >>> |
#include <iostream>
void main()
{
for ( ;; ) // forever
{
// "endless" loop:
char answer;
std::cout << "Exit program? Y/N:";
std::cin >> answer;
if ( answer == 'Y' || answer == 'y' ) {
return;
}
}
}
| <<< | Index | >>> |