Skip to content

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

Open
EStarikov wants to merge 9 commits intomainfrom
birepresent
Open

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

Conversation

@EStarikov
Copy link
Owner

No description provided.

@p-senichenkov
Copy link
Collaborator

Почините CI

void From10To2(int* arr, int n, int d)
{
if (d < 0) {
d = 256 + d;
Copy link
Collaborator

Choose a reason for hiding this comment

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

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

return n;
}

void summa(int* arr1, int* arr2, int* res)
Copy link
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)

}
}

int From2To10(int* arr)
Copy link
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
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