-
Notifications
You must be signed in to change notification settings - Fork 220
Comments
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
static можно убрать
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
В while уже проверяется это условие, if можно убрать
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Из-за того, что переменная типа double, это условие сработает только для num = 10. Если бы была int, работало бы для 11-19
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Кажется, тут ошибка)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Поскольку в while может быть только human <= 1, а human < 1 проверено в верхнем if, тут можно сделать просто else к нему
Моё первое домашнее задание на YandexPracticum.
С уважение Сергей Клушин.