Skip to content

4Hw1exKobzystyiMaksym#45

Open
MaksymKobzystyi wants to merge 1 commit intomasterfrom
4HwKobzystyiMaksym
Open

4Hw1exKobzystyiMaksym#45
MaksymKobzystyi wants to merge 1 commit intomasterfrom
4HwKobzystyiMaksym

Conversation

@MaksymKobzystyi
Copy link
Collaborator

No description provided.

using namespace std;

int main() {
int *arr;
Copy link
Owner

Choose a reason for hiding this comment

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

обьявляйте этот указатель после того как проверили введенный размер пользователя

cin >> arr[i];
}

int temp;
Copy link
Owner

Choose a reason for hiding this comment

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

вносите эту переменную в область видимости цикла, а не держите ее снаружи, просто необходимо стараться ограничивать область видимости переменной

arr[j + 1] = temp;
}
}
}
Copy link
Owner

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.

2 participants