exit.cpp 199 Bytes Raw Blame History Permalink 1 2 3 4 5 6 7 8 9 10 11 12 #include <iostream> #include <string> using namespace std; int main() { string a; cout << "If you enter 'exit', the program will exit" << endl; cin >> a; if (a == "exit") exit(0); return 0; }