17.08.2012, 09:05
Also instead of doing like
We can do like
pawn Код:
new ReactionTestAlph[ ][ ] = {
"A", "B", "C" // you can add yours
};
pawn Код:
new str[20],c;
for(new i=0;i<20;++i)
{
c = random(3);
if(c == 0) str[i] = random(10) + 48;//For numbers
if(c == 1) str[i] = random(26) + 65;//For upper case A-Z
if(c == 2) str[i] = random(26) + 97;//For lower case a-z
c = random(2);
if(c == 1 && i>=1)//here i>=1 means that reaction test will have min 1 digit
{
str[i]='\0';
break;
}
}
str[19] = '\0';