Untitled
unknown
plain_text
4 years ago
521 B
13
Indexable
for(j = 1; j <= 7; j++) { random = rand() % 35 + 1; while(lottoNumbs[j] == 0) { if(lottoNumbs.Contains(random) == false) { lottoNumbs[j] = random; } } } for(j = 1; j <= 7; j++) { random = rand() % 35 + 1; while(lottoNumbs[j] == 0) { bool isUnique = true; for(k = 1; k <= lottoNumbs.Length; k++) { if(lottoNumbs[k] == random) { isUnique = false; break; } } if(isUnique == true) { lottoNumbs[j] = random; } } }
Editor is loading...