/
GapiGap
/
lesson_12.2
Обзор
Документация
Войти
/
GapiGap
/
lesson_12.2
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
main.cpp
33 строки
705 B
GapiGap
upload files
24 июн 2025, 21:45
24 июн 2025, 21:45
b091ef7
Код
Авторство
О чём код?
#include<iostream> #include<windows.h> #include<string> #include<vector> #include<ctime> #include<random> int main() { srand(time(0)); SetConsoleCP(1251); SetConsoleOutputCP(1251); std::vector<std::string>random_word = { "������","","����","����","������","������","���","�����","�����","������","�����" }; int random = rand() % 10; std::string word = random_word[random]; std::string my_word; do { std::cout << "�������� ����� "; std::cin >> my_word; if (my_word == word) { std::cout << "���������! �� ��������! ���������� ����� � "<<my_word << std::endl; } else { std::cout << "�����������" << std::endl; } } while(word!=my_word); }