C++ command?

hey, im learning c++ and it would be helpful if i could have the person type exit to exit. more on bottom. here is the code.

#include <cstdlib>
#include <iostream>
using namespace std;
int main(int argc, char *argv[])
{
    int a;
    string yes="A equals 10.";
    string no="A does not equal 10.";
    string text="Enter a number to see if it is A.";
    cout<<text<<endl;
 
    while(a!=10){
                 cin>>a;
                 if(a==10){cout<<yes<<endl;
                 cout<<"Type exit to close window"<<endl;
                 }else{
                       cout<<no<<endl;
                       }
                       }
    system("PAUSE");
    return EXIT_SUCCESS;
}

Where the last 2 brackets are, i want it so if you type exit, it leaves, instead of the default “press any key…” thing. Thanks. :smiley: