Course Solutions Uncategorized (Solved) : C Please Help Debug Code Trying Repeating Numbers Yet Code Doesn T Work Int 0 12 Pinfo Sco Q35631277 . . . .

(Solved) : C Please Help Debug Code Trying Repeating Numbers Yet Code Doesn T Work Int 0 12 Pinfo Sco Q35631277 . . . .

 

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. . . . .

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post