Skip to content

Conversation

@in1g0
Copy link
Owner

@in1g0 in1g0 commented Feb 15, 2024

Pull-request 15.02.2024

if (numberOfPeople <= 1){
System.out.println("Некорректное значение для подсчёта, попробуйте еще раз.");
} else {
break;

Choose a reason for hiding this comment

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

Долго же я думал, что за синтаксис такой while .. else
Перед коммитом стоит приводить файлы к правильному стилю, так как код будут смотреть другие разработчики. В студии это легко делать путём вызова горячей комбинации клавиш (она зависит от ОС), её можно посмотреть в меню Code → Reformat Code

System.out.println("Хотите добавить ещё один товар?");
String answer = scanner.nextLine();
if (answer.equalsIgnoreCase("завершить")) {
break;

Choose a reason for hiding this comment

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

При вводе "Завершить" программа не заканчивает работу с выводом финального расчёта
Screenshot 2024-02-15 at 11 59 54

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.

4 participants