Ill send 3$ via paypal for the successful completion of the following assignment:
This problem will exercise both your modular programming skills, keeping track of lists and using the random number generators. We wish to produce 6 random numbers between the number 1 and 46. The program must run until a command is given to halt execution. During each pass, the program will prompt the user to hit enter, upon hitting enter, the program will produce 6 exclusive random numbers between 1 and 46. They need not appear in order and there must be no duplicates.
Below is a list of the function prototypes that can be used :
void ClearLOTTO (void);
int GetLOTTO (void);
int DUPLICATE (int Curr_Num);
void newline (int Num_Lines);
Implementation Details:
- You must use the function rand and srand to produce the random numbers.
- The system time will be used as a seed.
- Only integers between and including the numbers 1 to 46 must be used.
- The program must run until a command is entered to halt the program.
- The main routine only makes calls to user-defined functions except for a simple loop statement to control execution.
Hint: You may use a global variable such as int Lotto[6];
Example Output:
ENTER C TO CONTINUE OR ANY OTHER CHARACTER TO STOP: C
RUN NUMBER 1: 5 6 9 12 46 13
ENTER C TO CONTINUE OR ANY OTHER CHARACTER TO STOP: C
RUN NUMBER 2: 12 1 3 18 42 10
ENTER C TO CONTINUE OR ANY OTHER CHARACTER TO STOP: H
THANK YOU FOR PLAYING OUR GAME.