Answer the question
In order to leave comments, you need to log in
How to check for the second letter?
There is such a code, the first letter works. But if the letters match, then it's not a worker.
if (a == 2)
{
for (int i = 0; i < count; i++)
for (int j = 0; j < count; j++)
{
if (ob[i].prizv[0] < ob[j].prizv[0])
{
tem = ob[i];
ob[i] = ob[j];
ob[j] = tem;
}
}
}
Answer the question
In order to leave comments, you need to log in
if (a == 2)
{
for (int i = 0; i < count; i++)
for (int j = 0; j < count; j++)
{
if (ob[i].prizv[0] < ob[j].prizv[0]
|| ob[i].prizv[0] == ob[j].prizv[0] && ob[i].prizv[1] < ob[j].prizv[1])
{
tem = ob[i];
ob[i] = ob[j];
ob[j] = tem;
}
}
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question