Who can help me write a lottery software?

1。 First, record how many names are in * * * and store them in the variable num.

2。 Use the seed () function to set a random seed.

3。 Use rand()%num function to get a random integer r less than num.

4。 Output this r name.

5。 Moving the last name to the position of R name to cover it is to copy the num- 1 name to the position of R, and then subtract 1 from the total number of names num.

6。 Loop 3 to 5 steps until num is reduced to 0, which means all the names are taken away. end of program