#include #include #include using namespace std;int main(){ multimap names; string n; names.insert(pair("Z", "F")); names.insert(pair("Z", "A")); names.insert(pair("S", "T")); names.insert(pair("S", "A")); names.insert(pair("S", "J")); names.insert(pair("D", "H")); names.insert(pair("D", "W")); names.insert(pair("D", "R")); multimap::iterator p; cout << "Enter last name: "; cin >> n; p = names.find(n); if(p != names.end()) { // found a name do { cout << n << ", " << p->second; cout << endl; p++; } while (p != names.upper_bound(n)); } else{ cout << "Name not found.\n"; } return 0;}