Dualsort
void dualSort(int accountNumbers[], double accountBalances[], int ARRAY_SIZE)
{
int minIndex;
for(int i = 0; i < ARRAY_SIZE - 1; i++)
{
minIndex = i;
for(int j = i + 1; j < ARRAY_SIZE; j++)
{
if(accountNumbers[j] < accountNumbers[minIndex])
{
minIndex = j;
}
}
swap(accountNumbers[i], accountNumbers[minIndex]);
swap(accountBalances[i], accountBalances[minIndex]);
}
}
Worried Wombat