For C++:
Please help me debug this code. I am trying to no repeatingnumbers, yet my code doesn’t work.
for (int i = 0; i < 12;i++)
{
while (pinfo[i].score == pinfo[j].score&& i > 0)
{
for (j = 0; j < i; j++)
{
if (pinfo[i].score == pinfo[j].score)
{
cout << “Please enter differnt score from any otherplayers: ” << endl;
cout << “Player” << i+1 << “‘s Score: “<< endl;
cin >> ws;
cin >> pinfo[i].score;
}
}
}
}
Expert Answer
An answer will be send to you shortly. . . . .