lundi 29 février 2016

If statement to check if variable landed on 2 numbers out of 10

I tried this code, but I'm getting an error. What is an alternative to this?

int chance = rand.Next(1, 11);

if (chance == 1 || 10)
{
    string win = "lose";
}

This is in C#




Aucun commentaire:

Enregistrer un commentaire