Skip to content

Савелий Трясцин#4

Closed
boboboba wants to merge 2 commits intocppdevcourse:masterfrom
boboboba:master
Closed

Савелий Трясцин#4
boboboba wants to merge 2 commits intocppdevcourse:masterfrom
boboboba:master

Conversation

@boboboba
Copy link
Copy Markdown

@boboboba boboboba commented Oct 8, 2025

No description provided.

Copy link
Copy Markdown
Collaborator

@czertyaka czertyaka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Замечания минорные, задание принято

P.S. PR вливать не надо

P.P.S. Не сразу заметил, что тесты не прошли

Comment thread main.cpp Outdated

int main() {
std::random_device rd;
unsigned int actualNumber = rd() % 10;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Эту переменную можно сделать константой

Comment thread main.cpp
}
else {
std::cout << "Correct!\n";
return 0;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Если использовать return внутри тела цикла, можно ли организовать условие как-то иначе, уменьшив вложенность?

Comment thread main.cpp Outdated
unsigned int actualNumber = rd() % 10;

while (true) {
unsigned int guess;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Предпочтительнее всегда инициализировать переменные, даже перед std::cin

Comment thread main.cpp Outdated

while (true) {
unsigned int guess;
std::cout << "Guess a number from 0 to 9:" << std::endl;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Тест у вас не прошел, потому что тут забыли пробел

@boboboba boboboba closed this by deleting the head repository Jan 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants