Skip to content

java-jabki-03#1

Open
andreikuzn wants to merge 6 commits intomainfrom
develop
Open

java-jabki-03#1
andreikuzn wants to merge 6 commits intomainfrom
develop

Conversation

@andreikuzn
Copy link
Copy Markdown
Owner

No description provided.

Comment thread Main.java
boolean isPrime = true;
if (k <= 1) {
isPrime = false;
} else {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

в текущей логике мы отсекаем числа меньше или раные 1, а далее реазулизем перебор
но мне кажется мы можем сразу сделать проверку и не проверять перебором числа, которые больше 2 и являются четными

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.

внес правки

Comment thread Main.java Outdated
isPrime = false;
} else {
int j = 2;
while (j < k) {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

мы точно хотим проверять до того момента, пока j не станет больше k? мне кажется надо сильно меньше проверок

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.

также внес правки

Comment thread Main.java
System.out.println(i);
}

// дз3
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

если комментарий однострочный или то обычно используется //
если комментарий состоит из нескольких строк или там что-то важное, то необходимо использовать /* */

Comment thread Main.java Outdated
System.out.println(i);
}

/* дз3
Copy link
Copy Markdown

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

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.

3 participants