Skip to content

Conversation

@Karakaten
Copy link

No description provided.

scanPerson = scanner.nextInt();
if (scanPerson == 1) {
System.out.println("Подсчет не нужен");
System.exit(0);

Choose a reason for hiding this comment

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

Лучше тут программу не заканчивать, а предлагать ввести другое значение

case 3:
case 4: {
return rubles + "ля";
}

Choose a reason for hiding this comment

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

Фигурные скобки в switch не обязательны

product.setCost(inputPrice());
calculator.setBill(product);
System.out.println("Завершить? Нажмите любой символ, чтобы продолжить");
} while (!scanner.next().equalsIgnoreCase("Завершить"));

Choose a reason for hiding this comment

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

Хорошее использование do-while, молодец

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