Multiple conditions in if statement
问题 No matter what number is generated here I always get the first option (penguins). I can't seem to see any problem with my code, anyone else see what's wrong? { srand(time(0)); prand = (rand() % 20); if (prand == 1,5,9,10,14,15,19,20){ entity = "penguins"; srand(time(0)); pquantity = (rand() % 8) + 2; } else if (prand == 2,6,11,16,18){ entity = "troll"; pquantity = 1; } else if (prand == 3,7,12,17){ entity = "goblin"; pquantity = 1; } else if (prand == 4,8,13){ entity = "wizard"; pquantity = 1