Hi everyone, well i'm new to c programming..basically i need some help of how to figure out a non repeat random number generator...i got an assignment on that..here the question..

Six numbers between 1 and 40 inclusive are generated at random.

If a number has been generated it is not generated a second time.

Each time the game is played a completely new and random set of six numbers between 1 and 40 inclusive are generated.

A player can bet any six numbers between 1 and 40 inclusive.

The cost for each bet is $20. A player can bet as many times as he wishes for each

draw. If the player gets all the six numbers correct (the order is not important) he wins the

jackpot.

If more than one player wins the six correct numbers the jackpot is shared equally among

them. The program should be able to record all the players, their bet and the total bet. For

five, four and three correct (again order is not important) betting consolation prizes are

awarded. Obviously as the number of correct numbers decreases the number of potential

winners increases and the prizes decrease also.

The lecturer told to make use of function..but how and where to start..:S:S

i know there are many topic on random number on this forum...any reference would be appreciate...help me plz...thx

p.s sorry for the bad english..:P:P