#include #include using namespace std; int main() { multiset a; multiset b; string w1; string w2; cout << "Enter two words: " << endl; cin >> w1; cin >> w2; for (unsigned int i = 0; i < w1.size(); i++) a.insert(w1[i]); for (unsigned int i = 0; i < w2.size(); i++) b.insert(w2[i]); if (a == b) cout << "The words are anagrams" << endl; else cout << "The words are not anagrams" << endl; }