#include #include "CPstring.h" // file: smallof3.cc // demonstrate if else statments // find smallest (first alphabetically) of 3 strings int main() { string name1, name2, name3; cout << "Enter three names." << endl; cin >> name1 >> name2 >> name3; cout << "The smallest (in alphabetical order) is: "; if (name1 < name2) { if (name1 < name3) cout << name1 << endl; else cout << name3 << endl; } else { if (name2 < name3) cout << name2 << endl; else cout << name3 << endl; } return 0; } Sample output: Enter three names. The smallest (in alphabetical order) is: a Enter three names. The smallest (in alphabetical order) is: a Enter three names. The smallest (in alphabetical order) is: a Enter three names. The smallest (in alphabetical order) is: andrew