//This function prints all scores, but if a score occurs more than once, it only prints it one time
void scores_once(int x[20], int size, int new_array[20])
{
for(int i=0; i<size; i++)
{
new_array[i]= -1;
}
new_array[0]= x[0];
cout<<new_array[0]<<endl;
for(int j=1; j<size; j++)
{
for(int k=0; k<size; k++)
{
if (x[j]!=new_array[k])
new_array[k+1]=x[j];
}
for (int l=0; l<size; l++)
{
cout<<new_array[l]<<endl;
}
}
Awebb999 -5 Newbie Poster
Sky Diploma 571 Practically a Posting Shark
Awebb999 -5 Newbie Poster
mrnutty 761 Senior Poster
Sky Diploma 571 Practically a Posting Shark
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.