WuLung Hsu
/
app_board-Lottery
The Lottery toy that used in LASS(http://lass-net.org/) Users and Developers conference 2016
Diff: main.cpp
- Revision:
- 2:254e72dcfb52
- Parent:
- 1:c9dba148697b
- Child:
- 3:357d242c2ee7
- Child:
- 4:0f4e8293e7d7
--- a/main.cpp Wed Jul 20 09:19:00 2016 +0000 +++ b/main.cpp Wed Jul 20 11:59:33 2016 +0000 @@ -76,7 +76,7 @@ // Generate non-repeat users for(int i=0;i<GIFT_MAXCNT;i++){ while(1){ - int rand_num = rand()%MAN_MAXCNT; + int rand_num = rand()%MAN_MAXCNT+1; int repeat=0; for(int j=0;j<i;j++){ if( gift[j] == rand_num ) repeat=1;