(Using C++) Alright so I got this problem to do in computer science from my teacher and I've got all of it working except for the checking for duplicates in a array (two dimensional but only in the columns). This is a snip of the part that checks for duplicates... Its not as "efficient" as it could be. I heard you could use for, for, if, for, then a do while. But I couldn't figure it out.
This is what I have now. I don't even know if it does work cuz currently I don't have the apmatrix library but know how to use it in class.
int R, Tickets, Cone, Ctwo, I;
//Checking for duplicates
//Checks to keep it from getting in infinite loop cuz its obviously = to itself
//Checks if equal to another in the array of numbers.
//checks to see if equal to previously used numbers.
Also seems like I could add those two if statements together?