Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
int k = 30, m = 560, n = 99;
int* a[] = { &k, &m, &n };
for (int i = 0; i < std::size(a) - 1; ++i)
{
for (int j = 0; j < std::size(a) - i - 1; ++j)
{
if (*a[j] < *a[j + 1])
{
std::swap(*a[i], *a[i + 1]);
}
}
}
std::cout << k << " < " << m << " < " << n;
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question