/
VadyaS
/
stroki
Обзор
Документация
Войти
/
VadyaS
/
stroki
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
Ugadayka.cpp
26 строк
472 B
VadyaS
upload files
15 мар 2025, 16:41
15 мар 2025, 16:41
bc2a39a
Код
Авторство
О чём код?
#include<iostream> #include<string> int main() { std::string word{ "apple" }; std::string enteredWord{}; for (int counter{}; word != enteredWord; ++counter) { std::cout << "Guess the word: "; std::getline(std::cin >> std::ws, enteredWord); if (word == enteredWord) { std::cout << "Right! You've won! The hidden word is: " << word; break; } else { std::cout << "Wrong" << std::endl; } } }