Регистрация | Вход
void AI(){ map<string, string> memory; string goal; while (true) { cout << "enter goal" << endl; cin >> goal; cout << "enter question" << endl; string question; cin >> question; if(question.find(goal)!=string::npos) { string answer = memory[question]; if (answer != "") cout << question << " this is " << answer << endl; else { cout << "enter answer" << endl; cin >> answer; memory[question] = answer; } } else cout <<"question is not sense"<< endl; }}