#include <iostream>
#include <string>
#include <unordered_map>
using namespace std;

int main() {
    cout << "Enter a word: " << endl;
    string word;
    cin >> word;

    string result = "";
    unordered_map<char, int> charCount;

    for (char c : word) {
        charCount[c]++;
    }

    for (char c : word) {
        if (charCount[c] == 1) {
            result += c;
        }
    }

    cout << result << endl;

    return 0;
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: