dictionary;
// Lug'atga so'z va uning tarjimasi kiritiladi
std::string word, translation;
char choice;
do {
std::cout << "So'zni kiriting: ";
std::cin >> word;
std::cout << "Tarjimasini kiriting: ";
std::cin >> translation;
dictionary[word] = translation;
std::cout << "Yana so'z kiritasizmi? (h/y): ";
std::cin >> choice;
} while (choice == 'h' || choice == 'H');
// So'zni qidirish tugmasi qo'shish
std::string searchWord;
std::cout << "Qidirish uchun so'zni kiriting: ";
std::cin >> searchWord;
// Qidirish va natijani chiqarish
std::map::iterator iter = dictionary.find(searchWord);
if (iter != dictionary.end()) {
std::cout << "Tarjimasi: " << iter->second << std::endl;
} else {
std::cout << "Bu so'z lug'atda topilmadi." << std::endl;
}
return 0;
}