Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- while(m < i+3){
- newpos = rand()%(i+3);
- o = 0;
- exit = 0;
- while(pos[o] != '\0'){
- if (pos[o] == newpos ){
- exit = 1;
- newpos = rand()%(i+3);
- o = 0;
- }
- else{
- o++;
- }
- }
- pos[m] = newpos;
- m++;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement