Ich würds so machen aber gibt auch andere Möglichkeiten:

Code:
randomize();
int zahl = random(49)+1;