exit.cpp 220 Bytes Raw Blame History Permalink 1 2 3 4 5 6 7 8 9 10 11 #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") { cout<<"exit!"<<endl; } }