So i am trying to generate a random number and if the number is 3 or 8 i what something to happen , it this case to add 1 to one of the 2 integers
keep in mind i really am only going off a book in C# and some knowledge in VB
int Number1 = 0;
int Number12 = 0;
string text;
string text2;
Exexs:
Random rnd = new Random();
int month = rnd.Next(1, 10);
if (month = 8)
{
Number1++;
}
else if (month = 3)
{
Number12++;
}
if (Number1 = 1)
{
text = "*";
}
goto Exexs;
}
}
Aucun commentaire:
Enregistrer un commentaire