Skip to content

Двоичное представление - #20

Open
EStarikov wants to merge 9 commits into
mainfrom
birepresent
Open

Двоичное представление#20
EStarikov wants to merge 9 commits into
mainfrom
birepresent

Conversation

@EStarikov

Copy link
Copy Markdown
Owner

No description provided.

@p-senichenkov

Copy link
Copy Markdown
Collaborator

Почините CI

Comment thread src/birepresent.c
void From10To2(int* arr, int n, int d)
{
if (d < 0) {
d = 256 + d;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Это не совсем честно. Если бы Вы действительно использовали 8-битный тип, это бы не сработало. Во-первых, там нет числа 256.
Во-вторых, это основано на том, что переполнение игнорируется. А это не так. Переполнение для знаковых чисел -- это UB.

Comment thread src/birepresent.c
return n;
}

void summa(int* arr1, int* arr2, int* res)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Не надо использовать транслит:

Suggested change
void summa(int* arr1, int* arr2, int* res)
void sum(int* arr1, int* arr2, int* res)

Comment thread src/birepresent.c
}
}

int From2To10(int* arr)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Решите, Вы используете для функций PascalCase или camelCase. Должно быть везде одинаково

@p-senichenkov

Copy link
Copy Markdown
Collaborator

Кажется, здесь ничего не изменилось

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