Skip to content

Проектная работа №1#1

Open
DmitriyMayor wants to merge 2 commits intomainfrom
dev
Open

Проектная работа №1#1
DmitriyMayor wants to merge 2 commits intomainfrom
dev

Conversation

@DmitriyMayor
Copy link
Copy Markdown
Owner

No description provided.


Scanner scanner = new Scanner(System.in);

for (int i = 1; i <= 3; i++) {
Copy link
Copy Markdown

@AleksandrKdev AleksandrKdev Jan 15, 2025

Choose a reason for hiding this comment

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

3 - лучше вынести в переменную выше, например:
int number = 3
для возможности дальнейшего изменения программы, если например придется вводить количество авто с клавиатуры

System.out.println("Некорректный ввод! Введите целое число.");
}

if (speed < 250 && speed > 0) {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

С максимальной и минимальной скоростью тоже лучше сразу так поступить

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