I am doing a final work in the first semester in BCC course and I need to do a Mega Sena algorithm with the following characteristics:
- Maximum of 10 players
- Each player must bet a minimum of 6 numbers and a maximum of 15 numbers
- Valid numbers range from 1 to 60
- Bets can not be repeated
The language used is Portugol, but we use a specific platform created by students of the University, so there are small variations in the semantics of the code in relation to the common Visualg.
My question is with regard to only a specific part of the code that could not resolve the betting part does not recur. If the user bets the number 1, the number 1 can no longer be used by anyone. Here is the code image.
I suppose the resolution to this problem can be solved by traversing the array completely and checking each bet, but I could not find a working method for this.
If you can help, feel free to use the C language itself.