Hi,
Is there a quicker way of doing this bit of code.want to roll 5x ten sided dice and add the results.The way i have done it looks nasty,
Do i have name each roll as a varible and then add the results?triedCode:int playerHealth=( (rand ()%10)+1)+( (rand ()%10)+1)+( (rand ()%10)+1)+( (rand ()%10)+1)+( (rand ()%10)+1);
but that only rolls once and multiplys it by 5.Code:int playerHealth=( (rand ()%10)+1)*5
any ideas?