Skip to content

Add files via upload#6

Merged
Chynchenko merged 1 commit into
mainfrom
Module_1
Nov 30, 2022
Merged

Add files via upload#6
Chynchenko merged 1 commit into
mainfrom
Module_1

Conversation

@Chynchenko

Copy link
Copy Markdown
Owner

No description provided.

@Fabolo12 Fabolo12 left a comment

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 Module_1/src/Lock.java
@@ -0,0 +1,22 @@
import java.util.Arrays;

public class Lock {

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 Module_1/src/Main.java
Comment on lines +9 to +13
if (x < 10) {
System.out.print("The length of array must be >= 10");
} else {
System.out.printf("The length of array is %d \n", x);
}

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 Module_1/src/Main.java
int y = in.nextInt();

if (y == 1) {
Arrays.sort(myArray);

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 Module_1/src/Main.java
}
}
System.out.println(Arrays.toString(myArray));
in.close();

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 Module_1/src/Main.java
Comment on lines +46 to +50
for (int i = 0; i < myArray.length; i++) {
if ((i+1)%3==0) {
myArray[i] = myArray[i] * myArray[i] * myArray[i];
}
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Кол-во шагов можно сократить

@Chynchenko Chynchenko merged commit 28ec3e2 into main Nov 30, 2022
@Chynchenko Chynchenko deleted the Module_1 branch November 30, 2022 09:18
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