#include <iostream>
#include <string>
#include <cmath>
#include <math.h>
#include <algorithm>
#include <cstdlib>
using namespace std;
int main()
{
string names[10];
int score[10];
for(int scores = 0; scores < 10; scores++)
{
cout << "What is your score? ";
cin >> score[scores];
cout << endl;
}
int swapHolder = -1;
int ten = 10;
for(int counter = 9; counter >= 0; counter--)
{
for(int i = 0; i < 10; i++)
{
if(score[i] > score[i + 1])
{
swapHolder = score[i + 1];
score[i + 1] = score[i];
score[i] = swapHolder;
}
}
ten--;
}
for(int i = 0; i < 10; i++)
{
cout << "Score: " << score[i] << endl;
}
system("pause");
return 0;
}
How do I fix my Run time failure #2??