i really need help!!!
i am a noob, just getting started in c++
and i need help sorting my array.
please don't suggest me std::sort because i don't really know how to use those! sorry i am such a noob,
but i prefer it the simplest way possible please help
{
do{
cout <<"enter score " << i << ": ";
cin >> scores[i];
if((scores[i] <= 0)||(scores[i] >=100))
cout << "invalid score\n";
}while((scores[i] <= 0)||(scores[i] >=100));
//this is where i input the scores.
void SortNumbers()
{
cout <<"the sorted list is ";
for(i= 0; i <scores[9]; i++)
{
if(scores[i]>scores[i+1])
Swap(scores, i);
cout << scores[i] << " ";
}
cout << endl;
}
void Swap(int scores[], int i)
{
int temp;
temp = scores[i];
scores[i]=scores[i+1];
scores[i+1] = temp;
}
//this is the part i am having trouble with
the swap my teacher told me does not work.... it may be just me, but i can't get it to work,
please reply fast
thank you!!!