//Sort 2 names #include #include using namespace std; void swap(string &n1, string &n2) //receive strings n1 and n2, exchange { string temp; temp=n1; n1=n2; n2=temp; } //swap void main() //input 2 names, sort, print { string first, second; cout<<"enter a name: "; getline(cin,first); cout<<"enter a name: "; getline(cin,second); if (first>second) swap(first, second); cout<<"In order: "<