Skip to content

Практическая работа №1 - #1

Open
formerFox wants to merge 4 commits into
mainfrom
dev
Open

formerFox wants to merge 4 commits into
mainfrom
dev

Conversation

@formerFox

Copy link
Copy Markdown
Owner

Созданы 2 класса Car, Race и изменен main

Comment thread src/main/java/Main.java

while(true){
System.out.println("Введите количество машин:");
if(scanner.hasNextInt()){

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Если ввести отрицательно число, то далее программа будет работать некорректно. Добавь проверку на отрицательное число.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

добрый день.
image

у меня работает и с отрицанием

Copy link
Copy Markdown
Owner Author

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