# Random Non Repetetive Numbers

Email
 Submitted on: 1/4/2015 8:12:00 AM By: Robert Cleaver (from psc cd) Level: Advanced User Rating: By 5 Users Compatibility: C++ (general), Borland C++ Views: 1028

This program fills an array[20] with random numbers between 1 and 20, without repeating a number. This code can be used for encryption, games, testing software and much much more. give me some credit if you use it, and if you like it vote.. if you change it, please send me the updated version. thanks for downloading it.

code:
Can't Copy and Paste this?
 ``` //************************************** // Name: Random Non Repetetive Numbers // Description:This program fills an array[20] with random numbers between 1 and 20, without repeating a number. This code can be used for encryption, games, testing software and much much more. give me some credit if you use it, and if you like it vote.. if you change it, please send me the updated version. thanks for downloading it. // By: Robert Cleaver (from psc cd) //************************************** /* Name: Robert Cleaver Date: 9 - 17 - 02 Prog: RANDOM.CPP Desc: Generates a non-repetetive random number */ #include #include #include typedef int itype[20]; void DoRandom(itype &RandomArr); int check(itype &RandomArr, int ArrayIndex); int main() { clrscr(); randomize(); itype RandomArr; DoRandom(RandomArr); getch(); return(0); } void DoRandom(itype &RandomArr) { int FillLoop; FillLoop = 0; RandomArr[1] = (rand() % 20) + 1; for (FillLoop = 2; FillLoop <= 20; FillLoop++) { RandomArr[FillLoop] = (rand() % 20) + 1; while (check(RandomArr,FillLoop) != 1) { RandomArr[FillLoop] = (rand() % 20) + 1; } cout<

Use this form to tell us if this entry should be deleted (i.e contains no code, is a virus, etc.).
This submission should be removed because:

What do you think of this code (in the Advanced category)?
(The code with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor (See voting log ...)